Tag: script

How to export variable using script?

How to export variable using script?

Create a script file with export commands.

vi myxport.sh
export JAVA_HOME=/opt/jre/1.8
export PATH=$PATH:$JAVA_HOME/bin
Execute the above file:
source myxport.sh
or
. myxport.sh
Advertisements