O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required