See the following script from scala tutorial, What does the !# mean?
#!/bin/sh
exec scala "$0" "$@"
!#
object HelloWorld extends App {
println("Hello, world!")
}
HelloWorld.main(args)
See the following script from scala tutorial, What does the !# mean?
#!/bin/sh
exec scala "$0" "$@"
!#
object HelloWorld extends App {
println("Hello, world!")
}
HelloWorld.main(args)
See: http://www.scala-lang.org/files/archive/nightly/docs-master/manual/html/scala.html
#!
and !#
mark script header. All content between those marks are ignored by scala interpreter. In that section you can put shell script which will launch the actual scala script.
The !#
is called a "bangshe" (opposite of a "shebang"). It is a bit like a closing brace on the header statement.