Skip to content

Instantly share code, notes, and snippets.

@hughdbrown
Created March 23, 2017 14:44
Show Gist options
  • Save hughdbrown/3fbec4334a9e7cbc6c056ced69d43295 to your computer and use it in GitHub Desktop.
Save hughdbrown/3fbec4334a9e7cbc6c056ced69d43295 to your computer and use it in GitHub Desktop.
How bash scripts should start
set -o errexit
set -o nounset # same as 'set -u'
set -o pipefail
# See notes in:
# http://www.davidpashley.com/articles/writing-robust-shell-scripts/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment