Created
November 4, 2011 21:23
-
-
Save bdenckla/1340519 to your computer and use it in GitHub Desktop.
bash script illustrating pipefail
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
#!/bin/bash | |
false; echo "false alone: $?" | |
false | head; echo "false piped to head: $?" | |
set -o pipefail | |
false | head; echo "false 'pipefailed' to head: $?" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment