I have two shell scripts.$ cat java_alternative_7#!/bin/shsudo update-java-alternatives -s java-7-oracle$ cat java_home_7#!/bin/shexport JAVA_HOME=/usr/lib/jvm/java-7-oracleIt's simple that I can execute/source these two files.$ sh java_alternative_7$ javac -versionjavac 1.7.x_yy$ source java_home_7$ echo $JAVA_HOME/usr/lib/jvm/java-7-oracleHow can I do these two steps in a single shot?
How can I execute and export in a single shellscript
bash;shell;environment variables;source