I've got a SHELL script which is using a pipe to separate my two commands:
ssh -oBatchMode=yes user@hostname "mysql -u yop -pyop -c yop | echo test"
The problem is even if my connection to MySQL doesn't work, it does the
I would like to forbid my script to perform any command if the previous command doesn't work.
I search for a solution using
if but I couldn't come up with anything.