As I know, newly running shell script inherits it's environment variables. Is there a way to block this? (running shell without variable inheriting)
|
feedback
|
|
It seems you can prefix your script with
From
Not sure why you would want to do this though... | |||||
feedback
|
|
One possibility (although it looks rather ugly):
| |||||
feedback
|
|
As far as I know, the answer is "No". You may override environmental variables within the script itself. The value of the environment variable should switch back to it's original value once the script is done running. You probably need to run the script as a child process: $ this.script.sh & so as to avoid having to log out of your shell ever single time your run the script in order to reset your environment variables to their original value. Edit: From an earlier poster, it would seem that I am wrong about it not being possible. | |||
|
feedback
|