what does export do?
Matthew Miller
mattdm at mattdm.org
Fri May 20 12:19:54 UTC 2005
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 at mattdm.org <http://www.mattdm.org/>
Boston University Linux ------> <http://linux.bu.edu/>
Current office temperature: 74 degrees Fahrenheit.
More information about the fedora-list
mailing list