Monday, February 1, 2010

Bash Options to Fail Fast

set -o errexit  # Exit on simple commands that return non-zero status.

set -o errtrace # Makes shell functions, command substitutions, and 
                # commands in subshells inherit traps on ERR

set -o nounset  # Exit on use of unset variables.
blog comments powered by Disqus