A sample batch file running a scala script with process to call external commands.
The same can be done for *nix systems.
| ::#! | |
| @echo off | |
| call scala -savecompiled %0 %* | |
| goto :eof | |
| ::!# | |
| Console.println("Hello, world!") | |
| argv.toList foreach Console.println | |
| import scala.sys.process._ | |
| import java.io.File | |
| println ("ls" #| "wc -l" !) | |