Re: what does export do?

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

 



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@xxxxxxxxxx        <http://www.mattdm.org/>
Boston University Linux      ------>                <http://linux.bu.edu/>
Current office temperature: 79 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