home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


export

export [variables ]
export [name = [value ] ...]
export -p

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 is used in other programs called by the script. If no variables are given, export lists the variables exported by the current shell. The second form is the Korn shell version, which is similar to the first form except that you can set a variable name to a value before exporting it. The third form is specific to ksh93 .

Option

-p

Print export before printing the names and values of exported variables. This allows saving a list of exported variables for rereading later.

Example

In the Bourne shell, you would type:

TERM=vt100
export TERM

In the Korn shell, you could type this instead:

export TERM=vt100


Previous: Reference: exit UNIX in a Nutshell: System V Edition Next: Reference: false
Reference: exit Book Index Reference: false

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System