Code:
if [ $(ssh devopsrun2 [[ -f /etc/passwd ]];echo $?) -eq 0 ]; then
echo "Remote file exists"
fi
The remote testing section:
Code:
ssh devopsrun2 [[ -f /etc/passwd ]]
Code:
echo $?
There is another way to check in Command-line: https://www.devopsrun.com/t-how-to-check...mmand-line