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.
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.
No comments yet.