The scala documentation shows that the way to create a scala script is like this:
#!/bin/sh
exec scala "$0" "$@"
!#
/* Script here */
I know that this executes scala with the name of the script file and the arguments passed to it, and that the scala command apparently knows to read a file that starts like this and ignore everything up to the reversed shebang !#
My question is: is there any reason why I should use this (rather verbose) format for a scala script, rather than just:
#!/bin/env scala
/* Script here */
This, as far a I can tell from a quick test, does exactly the same thing, but is less verbose.
_JAVA_OPTIONS
) prior to script launch. – J Cracknell May 1 '15 at 22:22