Bash

#!/usr/bin/env bash

set -o pipefail

# ...

Bash Strict Mode:

  • set -o errexit - halt on error
  • set -o nounset - halt if variable is unset
  • set -o pipefail - halt if command inside pipe failed

Bash ENV interpolations

  • "$FOO"
  • "${FOO}"
  • set -u raise error for undefined referenced variable