Created
March 11, 2024 19:41
-
-
Save marcogrcr/0b5a04579ad482ac11e05c73f6b36822 to your computer and use it in GitHub Desktop.
Recommended flags for shell scripts
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
# POSIX compliant | |
set -eux | |
# Bash | |
set -Eeuxo pipefail | |
# For information on `-eux`, see https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#set | |
# For information on `-Eo pipefail`, see https://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment