Skip to content

Instantly share code, notes, and snippets.

@jthelin
Created September 11, 2015 07:15
Show Gist options
  • Save jthelin/039b097a1e6e5c752e9d to your computer and use it in GitHub Desktop.
Save jthelin/039b097a1e6e5c752e9d to your computer and use it in GitHub Desktop.
hello-scala.sh - running a scala program / script directly from bash.
#!/bin/sh
exec scala "$0" "$@"
!#
object HelloWorld extends App {
println("Hello, world!")
}
HelloWorld.main(args)
@jthelin
Copy link
Author

jthelin commented Sep 11, 2015

chmod u+x hello-scala.sh
./hello-scala.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment