As the previous reply hints at, it has nothing to do with the ssh and everything with the ||. You can verify that it behaves the same way on a shell command line:
:/tmp/t # false; echo $? 1 :/tmp/t # false || echo FAIL; echo $? FAIL 0
So either just remove the || echo FAIL part, or make it something like || { echo FAIL; exit 1 }
In reply to Re: Pipe and return status through an "ssh"
by Crackers2
in thread Pipe and return status through an "ssh"
by sdolancu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |