Quote:
Originally Posted by icecoolcorey
how about in a script? didn't seem to work in a script file.
|
What do you mean by “didn’t seem to work”? Is it that the expected variables are not set when the script exits? This is normal behavior, and I’m afraid you can’t get variables from a child to propagate to the parent.
This is why “sh /etc/profile” has no measurable effect on the variables of the calling shell. If you actual commands which perform something of persistence (such as empty the temp folder or schedule an
at command), then they will of course work as intended.