What's next after shebang?
Makes sure the script exists on every error.
set -o pipefail
Sets verbose output
You can combine the
-e and the
-o pipefail command
set -eo pipefail is equivalent.
#!/usr/bin/env bash # Make sure that any errors cause the script to exit immediately. set -eo pipefail # Additional sets verbose output (traces) if the TRACE environment variable is # set, e.g. `set TRACE=1`. [[ "$TRACE" ]] && set -x