Skip to content

Instantly share code, notes, and snippets.

@davideicardi
Last active November 26, 2021 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davideicardi/ba15ebc5d784bd670723c16627eddcc9 to your computer and use it in GitHub Desktop.
Save davideicardi/ba15ebc5d784bd670723c16627eddcc9 to your computer and use it in GitHub Desktop.
Bash script best practices
#!/bin/bash
# set -e = exit in case of errors
# set -u = no undefined variable
# set -o pipefail = prevent pipeline errors
# more info: https://gist.github.com/usametov/a134115a0fa1157b45ea5d432510d2f6
set -euo pipefail
# TODO Add your script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment