Re: Adding environment variables to bash.

2008-09-11 Thread John Lawrence
> > 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 |

Re: Adding environment variables to bash.

2008-09-11 Thread John Lawrence
> > doesn't exactly work for Python scripts, though: > True, but you can use it in the following (admittedly messy) way: jl> cat setenv.sh /usr/bin/env python $@ . ./settmp rm settmp jl> cat env.py #!/usr/bin/python command = "export TEST='hello'\n" open('settmp', 'w').write(command) jl> . sete