Re: change environment variable via script

Páxina inicial
Anexos:
Mensaxe orixinal
+ (text/plain)
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Victor Odhner
Data:  
Para: Main PLUG discussion list
Asunto: Re: change environment variable via script
Another solution is to source your script into the current shell by
"dotting" it.

. ./script.sh

That runs script.sh in the current shell, so everything it does remains
part of your environment.
It's especially useful in ad hoc situations where you don't want to
modify your .profile.
And of course you can also use this approach to add the function to your
environment
only when you need it.

Be careful not to put an "exit" in the "dotted" script, since that will
end your session.

Vic


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss