View Single Post
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.
 

The Following User Says Thank You to lidow For This Useful Post: