unset

remove KornShell variable or function

KornShell Built-in


SYNOPSIS

unset name...

unset -fv name...


DESCRIPTION

Calling unset with no options removes the value and attributes of each KornShell variable name.

unset cannot remove names which have been set read-only.

Options

-f

removes the definition of each KornShell function name.

-v

removes the attribute and value of the variable name. (This is the default if no options are specified.)


DIAGNOSTICS

Possible exit status values are:
0

Successful completion.

1

Failure due to an invalid command line option.

2

Failure due to an invalid command line argument.

Otherwise, unset returns the number of specified names which are invalid, not currently set, or read-only.
"name" : readonly variable

The given name cannot be deleted because it has been marked read-only.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0.

unset is a built-in command of the Bourne and Korn shells on UNIX System V.


NOTE

This is a special built-in command of the MKS KornShell.


SEE ALSO

Commands:
readonly, sh


Updated MKS Toolkit [3khat16.ico]HP3000 [3khat16.ico]3kMail [archive16.gif]