Bash Script – What Does set -u Do?

bashshell-script

I've seen bash shell scripts which have this before some other commands

set -u

What does it do? I can't seem to find any documentation on it.

Best Answer

-u  Treat unset variables as an error when substituting.

You can give this page a try :

Set Man Page

Related Question