Name

export

Synopsis

                     
                        export
                      [options] [variables]

                        export
                      [options] [name
                     
                        =
                     [value]]...

Pass (export) the value of one or more shell variables, giving global meaning to the variables (which are local by default). For example, a variable defined in one shell script must be exported if its value will be used in other programs called by the script. When a shell variable has been exported, you can access its value by referencing the equivalent environment variable. If no variables are given, export lists the variables exported by the current shell. If name and value are specified, export assigns value to a variable name and exports it.

Options

--

Treat all subsequent strings as arguments, not options.

-f

Expect variables to be functions.

-n

Unexport variable.

-p

List variables exported by current shell.

Get Mac OS X Tiger in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.