Last active
November 26, 2021 09:01
-
-
Save davideicardi/ba15ebc5d784bd670723c16627eddcc9 to your computer and use it in GitHub Desktop.
Bash script best practices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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