Scala Shell Program

From GM-RKB
Jump to navigation Jump to search

A Scala Shell Program is a Scala Program that is a Shell Program.

    #!/bin/sh
    exec scala "$0" "$@"
    !#
    object HelloWorld extends App {
      println("Hello, world!")
    }
    HelloWorld.main(args).


References

2002

 #!/bin/sh
 exec scala "$0" "$@"
 !#
 object HelloWorld extends App {
 println("Hello, world!")
 }
 HelloWorld.main(args)