Created
October 3, 2014 14:30
-
-
Save omar-yassin/2e480f12057eb8cdd52f to your computer and use it in GitHub Desktop.
BASH: error catching pipes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tar ... | ssh ... | |
pipe_exit_status="${PIPESTATUS[@]}" | |
tar_status=`echo $pipe_exit_status | awk '{print $1}'` | |
ssh_status=`echo $pipe_exit_status | awk '{print $2}'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment