Re: Export Problem

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

 



> Perhaps a tad OT. From the command line, if I do "export FOO='bar'" and
> then do export -p, the result is as expected.
> 
> However, if I do the same thing in a script:
> #!/bin/bash
> export FOO="bar"
> 
> . . . it does not create the variable. export -p and it's not there.
> 
> Where am I going wrong? What don't I get? 
> 
> Thanks.

When you run from a script if forks and runs in it's on environment. The export
is only seen in the script environment.
-- 
Richard E Miles
Federal Way WA.
registered linux user 46097



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

  Powered by Linux