4 ms·
I started using these recently: set -o nounset set -o pipefail set -o errexit set -o xtrace I added them to all my scripts, and I also added all except err
by jafaku 12y ago
I started using these recently:
set -o nounset
set -o pipefail
set -o errexit
set -o xtrace
I added them to all my scripts, and I also added all except errexit to ~/.bashrc
The first one would save you from unset variables.
- vlisivka 12y agoYou might be interested in bash-modules library, which is written with these options in mind.