Thread
:
How to source ~/.profile through a script with effects lasting after the script has run?
View Single Post
lidow
2011-09-02 , 06:19
Posts: 151 | Thanked: 93 times | Joined on Sep 2009 @ sofia, bulgaria
#
10
From exec manpage:
The exec() family of functions replaces the current process image with a new process image.
exec script.sh
where in script.sh you source environment and then exec bash, will substitute your current shell with the one from the script. This will give you all environments you need, and will not open chain of subshells.
Quote & Reply
|
The Following User Says Thank You to lidow For This Useful Post:
白い熊
lidow
View Public Profile
Send a private message to lidow
Find all posts by lidow