Skip to content

Instantly share code, notes, and snippets.

@gwsu2008
Last active January 3, 2020 06:16
Show Gist options
  • Save gwsu2008/1e8035a3587f5731936a912ee8e90669 to your computer and use it in GitHub Desktop.
Save gwsu2008/1e8035a3587f5731936a912ee8e90669 to your computer and use it in GitHub Desktop.
bash set pipe status
set -e causes the shell to exit whenever a pipeline, list, or compound command exits with non-zero status;
set -u causes the shell to exit whenever it attempts to expand a parameter which isn't defined.
set -o pipefail If set, the return value of a pipeline is the value of the last (rightmost) command to exit with a non-zero status, or
zero if all commands in the pipeline exit successfully. This option is disabled by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment