JAVA_HOME not picked up as en var
Why wouldn't this work?
root@0[kd]# ls -l *.sh
-rwxr-xr-x 1 root root 241 May 4 16:51 javakpath00.sh
root@0[kd]# which bash
root@0[kd]# bash -version
GNU bash, version 3.00.16(1)-release (i386-pc-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
Re: JAVA_HOME not picked up as en var
In article <firstname.lastname@example.org. com>,
> Why wouldn't this work?
> export JAVA_HOME
> echo $JAVA_HOME
[ snip ]
Executing a script in the normal way (./thescript, for example)
creates a subshell, and any environment variables you set are
set for the subshell -- and not passed back to the parent shell.
Hence your script has no effect on its caller's environment
To get the effect I think you want, you need to instead "source"
the script. If you're also using bash as your interactive
shell, you'd say
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
|All times are GMT. The time now is 02:31 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.