Last active
June 4, 2022 21:18
-
-
Save akskap/37b62c83ce95f365d8dadd12bfa3828e to your computer and use it in GitHub Desktop.
Set builtins in bash
This file contains hidden or 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
| #!/usr/bin/env bash | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| function print_var() { | |
| echo "${var_value}" | |
| } | |
| print_var | |
| $ ./sample.sh | |
| ./sample.sh: line 8: var_value: unbound variable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment