Last Updated: February 25, 2016
·
592
· benkennish

Get error codes of all commands in a bash pipe

If you pipe commands together in bash, the resulting error code will be for the last command in the pipe. To get all the error codes, use the $PIPESTATUS variable