Re: how to set environmental variables for a shell temporarily (ie not via .bashrc)
On Sunday 07 May 2006 18:33, Henrique G. Abreu wrote:
> try
> #!/bin/sh
> it may work
> Henrique
hi Henrique,
i had tried that (described in my original post), and it did not work.
On the other hand, what does work,
is taking all the different variable definitions and export lines and putting
them in a file (eg. variable_exports) .
then i simply say
source variable_exports
the difference is that
running a shell script
( ie your suggestion of running
./variable_exports with a first line of
#!/bin/sh )
forks a _new_ shell (a unix child process ) and does not! affect the running
process.
On the other hand
source variable_exports
sets the variables in variable_exports
for the same process.
Mitchell
Reply to: