Adding environment variables to bash.
John Lawrence
mail at johnlawrence.net
Thu Sep 11 05:28:15 EDT 2008
>
> when a process starts, it gets a *copy* of the parent's environment. it
> can modify that copy, but it cannot modify the variables in the parent.
You can make a command use the current shell though if you use the '.'
command e.g.:
jl > cat env.sh
export TEST='hello'
jl > ./env.sh && env | grep TEST #Doesn't set TEST in parent shell
jl > . ./env.sh && env | grep TEST #Adding '. ' before the command
uses the same shell
TEST=hello
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080911/e4cdb939/attachment.html>
More information about the Python-list
mailing list