Re: Export to Environment in Scripts

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


On Sat, 2005-05-07 at 14:40 -0500, Les Mikesell wrote:
> On Sat, 2005-05-07 at 12:08, David Cary Hart wrote:
> > I'm trying to export a variable to the environment and then test against
> > the environment variable the next time the script is run.
> > 
> > While I can do this from the command line, when export is called from a
> > script it doesn't show up in printenv. What am I doing wrong?
> Environment settings can only be inherited.  You must make sure that
> the variable is used in the same shell or a process started by
> the shell that exported it.  If you want all your processes to
> see a setting you must set it in your login shell or in a
> file sourced by subshells as they start (i.e. your .bashrc).

Thanks. I ended up just writing to a small text file which is inelegant
but it works.
Multi-RBL Check:
Kill Spam at the Source:
Today's Spam Trap Adds:

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

  Powered by Linux