Created
May 30, 2012 09:46
-
-
Save hpcx82/2835182 to your computer and use it in GitHub Desktop.
Compile & Run C++/Java/Scala as a script language
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export exe=`echo $1 | awk -F. '{print $1}'` | |
#make sure the g++ version is 47 | |
g++ $1 -std=c++11 -o $exe | |
./$exe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export exe=`echo $1 | awk -F. '{print $1}'` | |
javac $1 | |
java $exe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export exe=`echo $1 | awk -F. '{print $1}'` | |
scalac $1 | |
scala $exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment