Re: Export to Environment in Scripts

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

 



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).

-- 
  Les Mikesell
   les@xxxxxxxxxxxxxxxx



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

  Powered by Linux