Skip to content

Instantly share code, notes, and snippets.

@willm
Last active January 19, 2017 17:11
Show Gist options
  • Save willm/06d4de7b004c7f7f9477e16e9950bb46 to your computer and use it in GitHub Desktop.
Save willm/06d4de7b004c7f7f9477e16e9950bb46 to your computer and use it in GitHub Desktop.
bash script prelude
#!/usr/bin/env bash
set -euxo pipefail
#-e stop if a command fails
#-u error and stop if any variable is unset
#-x print each command before running it
#-o pipefail fail as soon as a command within a pipeline fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment