Last active
December 15, 2015 22:09
-
-
Save seralf/5331252 to your computer and use it in GitHub Desktop.
Recipes for scala scripting in shell/windows :-)
from the official documentation:
http://www.scala-lang.org/docu/files/tools/scala.html
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
::#! | |
@echo off | |
call scala -savecompiled %0 %* | |
goto :eof | |
::!# | |
/* | |
* this is a scala script for Windows! | |
*/ | |
Console.println("Hello, world!") | |
argv.toList foreach Console.println |
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/sh | |
exec scala -savecompiled "$0" "$@" | |
!# | |
/* | |
* this is a scala script for Unix! | |
*/ | |
Console.println("Hello, world!") | |
argv.toList foreach Console.println |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment