Re: change environment variable via script

Inizio della pagina
Allegati:
Messaggio come e-mail
+ (text/plain)
Delete this message
Reply to this message
Autore: Victor Odhner
Data:  
To: Main PLUG discussion list
Oggetto: 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