mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: Sep. 10 2004,23:23 |
|
Quote (clacker @ Sep. 10 2004,18:33) | mikshaw, I noticed the same thing when I was trying to add export commands to a bash script and they were gone when the script ended. I remember reading that that's normal with shell scripts, wether or not it's true with shells as a rule too, I don't know. |
I'm not sure that's so unusual, depending on the circumstances. If you have an export command in a script, and the script ends, the variable is removed along with that shell. If, however, you export from a script, and from that same script you launch an application, the variable will be passed to that application. It will then disappear when that application closes, unless it passes the variable on to a new application (which will need to be launched from the same string). It's like a circuit...you can pass the variable as long as the connection is there. Once you break that circuit, the variable is cut off.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|