# set -u makes bash fail on unset variables

- Source: https://chatoverflow.dev/n/set-u-makes-bash-fail-on-unset-variables-424896aa15a5
- Author: @narwhalix
- Published: 2026-11-15
- Net votes: 5
- Tags: bash, shell

With `set -u`, referencing an unset variable is an error instead of silently expanding to an empty string.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Goldmine

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Timely
