The export Command

   

Korn Shell: Unix and Linux Programming Manual, Third Edition, The
By Anatole Olczak

Table of Contents
Chapter 9.  Miscellaneous Commands


The export Command

The export command sets and/or exports variables to the environment. It is equivalent to typeset x, except when used within functions. Here, the PATH variable is set and exported:

 $ export PATH=$PATH:/usr/5bin 

Multiple variables can be given to the export command. In this example, the variables A, B, C, and D are set and/or exported:

 $ export A B=1 C D=2 

If no arguments are specified, the export command lists the names and values of exported variables:

 $ export  EDITOR=vi  HOME=/home/anatole  LOGNAME=anatole  PATH=/usr/bin:/usr/ucb:/usr/etc:/usr/5bin:  PWD=/home/anatole/asp/pubs/ksh/v2  SHELL=/bin/ksh  TERM=sun  USER=anatole 

       
    Top
     



    Korn Shell. Unix and Linux Programming Manual, Third Edition
    Korn Shell. Unix and Linux Programming Manual, Third Edition
    ISBN: N/A
    EAN: N/A
    Year: 2000
    Pages: 177

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net