2018-11-09 17:52 skrev W. Michael Petullo:
Here is a more practical example which demonstrates the problem:$ echo false | dbclient -T [email protected] $ echo $? 0
That is because $? contains the exit status of the left-most command (echo), not the pipe. If you are using a bash shell, you need to use PIPESTATUS to find it, read more at: https://unix.stackexchange.com/a/73180
-- \\// Peter - http://www.softwolves.pp.se/
