How to export environment variables to parent

say, you set up all the variables in one shell --- env.ksh, as below

 

export JAVA_HOME=/usr/java/jdk1.5.0_09/
export M2_HOME=/home...

export ANT_HOME=/home/apache-ant-1.7.0
export PERFORCE_HOME=/home/perforce
export PATH=$JAVA_HOME/bin:$M2_HOME/bin:$ANT_HOME/bin:$PERFORCE_HOME/bin:$PATH
export P4PORT=....net:1999
export P4CLIENT=..-2-lx

 

if you run ksh env.ksh --- those variables will be only valid in that shell.

 

if you run . ./env.ksh --- those variables can be exported out of the shell to the parent shell.

你可能感兴趣的:(java,apache,.net,ant,UP)