what does export do?
Matthew Miller
mattdm at mattdm.org
Fri May 20 20:52:26 UTC 2005
On Fri, May 20, 2005 at 09:40:22PM +0100, THUFIR HAWAT wrote:
> I'm looking at "export" within the context trying to find out where
> environment variables are stored. In windows it's possible to bring
> up all the environment variables; I assume the same can be done with
> linux. my question should've been: where do I find the environment
> variables?
Just as in Windows, each process has its own copy of the environment. You
can get a list at a prompt with "printenv". Or, you could use the 'getenv'
system call in a program. Or in a perl one-liner:
perl -e 'foreach (keys %ENV) { print "$_=$ENV{$_}\n;" }'
--
Matthew Miller mattdm at mattdm.org <http://www.mattdm.org/>
Boston University Linux ------> <http://linux.bu.edu/>
Current office temperature: 79 degrees Fahrenheit.
More information about the fedora-list
mailing list