unset variable

A variable that has never been assigned, or has been removed with the unset builtin, which is different from one set to an empty string.

In more detail

Normally both expand to nothing, so a typo in a name goes unnoticed. set -u turns expanding an unset variable into an error, and ${var-default} tells the two cases apart.

Related terms

Taught in

References