Skip to content

Instantly share code, notes, and snippets.

@mlafeldt
Created November 8, 2013 10:25
Show Gist options
  • Save mlafeldt/7369120 to your computer and use it in GitHub Desktop.
Save mlafeldt/7369120 to your computer and use it in GitHub Desktop.
pipefail example
[tmp]$ bash
[tmp]$ set -e
[tmp]$ (exit 10) | cat -
[tmp]$ echo $?
0
[tmp]$ set -o pipefail
[tmp]$ (exit 10) | cat -
[tmp]$ echo $?
10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment