Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 818 Bytes

nounset.md

File metadata and controls

34 lines (22 loc) · 818 Bytes

Nounset option

  • set -u or set -o nounset
  • By default, unset variables are just evaluated as if they were the empty string.
  • With this option, BASH stops and fail if you try to use an unset variable.

#### Without Nounset

filename

bash ./examples/options/options_without_nounset.sh

#### With Nounset filename

bash ./examples/options/options_with_nounset.sh




#### DON'T TRY AT HOME rm -rf "$DIRECTORY/*"






### References