Re: what does export do?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 20, 2005 at 11:27:39AM +0100, Paul Howarth wrote:
> THUFIR HAWAT wrote:
> >but it doesn't say which files are effected by the command.  is it
> >stored somewhere?
> No files are affected by the command. All it does is mark a shell 
> variable as being an environment variable that is passed on to any 
> subsequent commands you execute *from that shell*.

Watch this:

$ echo $VARIABLE

$ VARIABLE=something
$ echo $VARIABLE
something
$ bash   # <-- starting another shell, which is just another program
$ echo $VARIABLE

$ exit   # back to the main shell
exit
$ echo $VARIABLE
something
$ export VARIABLE
$ bash   # <-- a new subshell again
$ echo $VARIABLE
something


-- 
Matthew Miller           mattdm@xxxxxxxxxx        <http://www.mattdm.org/>
Boston University Linux      ------>                <http://linux.bu.edu/>
Current office temperature: 74 degrees Fahrenheit.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux