Re: exported shell variables and scope
Previously Dale Scheetz wrote:
> but when I do an 'env' or test for the variables in another shell, none of
> these variables exist! (Well, PATH exists, but is the old path)
Environment is a per-process thing, and processes can not change the
environment of another process. So if you run a shell script that changes
its environment settings, nothing changes for you.
> I've seen this sort of design before in other people's scripts, and they
> work fine. What am I missing, and how do I distribute these values to
> other scripts?
eval `script-that-outputs-export-commands`
Wichert.
--
_________________________________________________________________
/ Nothing is fool-proof to a sufficiently talented fool \
| wichert@wiggy.net http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0 2805 3CB8 9250 2FA3 BC2D |
Reply to: