I long adopted
/bin/sh -eu
header in my scripts. It's a must-have. /bin/sh -eu
header in my scripts. It's a must-have.If you think your colleagues won't know this, "set -o errexit; set -o nounset" would be easier for them to search on.
(Via "3.4 Shell Parameters" → "3.4.1 Positional Parameters" → "4 Shell Builtin Commands", or searching the whole page for "-e".)