Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


Unexport

Built-in

SYNTAX

Unexport [name… | -r | -s]

DESCRIPTION

The Unexport command removes the specified variables from the list of exported variables. The list of exported variables is local to a script, so unexported variables are removed only from the local list.

You can choose to list all unexported variables instead, by executing Unexport without any parameters.

INPUT

None

OUTPUT

None, unless you omit the name parameter. In that case Unexport lists all unexported variables to standard output in the form of Unexport commands. You can change this output by using the -r and -s options.

STATUS

Unexport can return the following status codes:

0

no error

1

syntax error

PARAMETERS

name

Names the variables to unexport.

OPTIONS

-r

Generates Export commands for all unexported variables, thus reversing the sense of the output.

-s

Lists unexported variables without putting them in the form of Unexport commands.

EXAMPLES

In this script, the SrcDir variable is defined, exported, and finally unexported, making it no longer available to scripts and tools.

Set SrcDir "HD:source:"
Export SrcDir # SrcDir is available to scripts and tools
Unexport SrcDir

The following example lists all unexported variables. To export them, you simply select and execute the Export commands.

Unexport -r
Export var1
Export var2

SEE ALSO

Export

Set

 
 


Last Updated July 2000