unset

NAME

unset - remove variables/parameters

SYNOPSIS

C shell

unset pattern

Korn shell

unset [-fv] parameter ...

DESCRIPTION

This command is a built-in command in the C shell and the Korn shell.

C shell

The unset(1) command removes all variables whose names match pattern, unless they are read-only. Thus, 'unset *' removes all variables unless they are read-only; this is not recommended. It is not an error if no variables are removed.

Korn shell

The unset(1) command unsets the named parameters (-v, the default) or functions (-f). The exit status is non-zero if any of the parameters were already unset; otherwise, it is zero.