Created
April 10, 2015 15:14
-
-
Save ramn/98301d6dac804d97b430 to your computer and use it in GitHub Desktop.
Scala as script (shebang header)
This file contains 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
#!/bin/bash | |
CP="$(find $HOME/.ivy2 -path '*myorg/*util_2.11-*.jar' | tail -1)" | |
exec scala -savecompiled -cp "$CP" $0 $@ | |
!# | |
import com.myorg.MyClass | |
io.Source.stdin | |
.getLines | |
.map { line => | |
new MyClass(line) | |
} | |
.foreach(println) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment