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. Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.

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.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC Integrity


SEE ALSO

Commands:
readonly, sh


PTC MKS Toolkit 10.1 Documentation Build 15.