Home OS X
OS X Syntax

unset

Unset a variable - the opposite of set.

SYNTAX
      unset pattern	

e.g.
   unset name[subscript]    destroys the array element at index subscript.
unset name , where name is an array, removes the entire array.

unset removes all variables whose names match pattern, unless they are read-only.

`unset *' thus removes all variables unless they are read-only; this is a bad idea.

It is not an error for nothing to be unset.

"Look Dave, I can see you're really upset about this" - HAL

Related commands:

set - Set a variable
unsetenv - unset an environment variable

Equivalent BASH command:

unset
- unset a variable



Back to the Top

Simon Sheppard
SS64.com