3 ms·
Can you at least explain what this is doing, outside of saving me headaches?
by mod 12y ago
Can you at least explain what this is doing, outside of saving me headaches?
- barsonme 12y agoset -o errexit (set -e): exit script when command fails set -o nounset (set -u): exit script when it tries to use undeclared variables set -o pipefail: returns error from pipe `|` if any of the commands in the pipe fail (normally just returns an error if the last fails)
- redsymbol 12y agohttp://redsymbol.net/articles/unofficial-bash-strict-mode/ http://redsymbol.net/articles/unofficial-bash-strict-mode/
- Anderkent 12y ago-errexit: exit the script when a command fails -nounset: fail when referencing an unset variable -pipefail: fail when the any command in a pipeline fails, not just the last one The last option is unfortunately harder to use, since some programs misbehave in pipelines.