Friday, February 24, 2012

Why a bash script cannot change environment variables

Read in an online forum:
Your shell process has a copy of the parent's environment and no access the parent process's environment whatsoever. When your shell process terminates any changes you've made to its environment are lost. Sourcing a script file is the most commonly used method for configuring a shell environment, you may just want to bite the bullet and maintain one for each of the two flavors of shell.

0 comments:

Post a Comment