On Jan 26, 2008 10:12 AM, Godmar Back <[log in to unmask]> wrote:
>
> Note, however, that this rule does not apply to shell scripts: inside
> shell scripts, it's okay to export CLASSPATH because such settings
> will be valid only for the shell executing the script; in Unix,
> changes to environment variable will not reflect back to the shell
> from the shell script was started.
>
Oops, should read: "... changes to environment variables will not
reflect back to the shell from *which* the shell script was started."
I should also mention that if you place an export CLASSPATH command in
your ~/.bash_profile or ~/.bashrc, you've committed the same mistake
because the setting then will be valid for your initial shell session
(or every new session, or both, depending on the content of your
~/.bash_profile.) So ignore any instructions that propose you do that.
- Godmar
|