This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Re: Scripting with Scala

1 reply
Kevin Wright 2
Joined: 2010-05-30,
User offline. Last seen 26 weeks 4 days ago.
For completeness, the corresponding preamble on windoze systems is:
    ::#!    @echo off    call scala %0 %*    goto :eof    ::!#

On 15 February 2011 13:51, Kevin Wright <kev [dot] lee [dot] wright [at] gmail [dot] com> wrote:
Almost there... The correct syntax is:
    $ scala MyScript.scala
Or from the *nix command line you can simply prefix your script with:
    #!/bin/sh     exec scala "$0" "$@"    !#
mark as executable, and run it as
    $ ./MyScript.scala
as per any other bash/awk/perl/eeeeeeeeeetc. script
On 15 February 2011 13:44, Andrey Popp <8mayday [at] gmail [dot] com> wrote:
Hello,

wouldn't be great to have an easy way to run Scala scripts
from command line:

 $ runscala MyScript.scala

Haskell GHC already do this with runghc executable.



--
Kevin Wright

gtalk / msn : kev [dot] lee [dot] wright [at] gmail [dot] comkev [dot] lee [dot] wright [at] gmail [dot] commail: kevin [dot] wright [at] scalatechnology [dot] com
vibe / skype: kev.lee.wrightquora: http://www.quora.com/Kevin-Wright
twitter: @thecoda

"My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger" ~ Dijkstra



--
Kevin Wright

gtalk / msn : kev [dot] lee [dot] wright [at] gmail [dot] comkev [dot] lee [dot] wright [at] gmail [dot] commail: kevin [dot] wright [at] scalatechnology [dot] com
vibe / skype: kev.lee.wrightquora: http://www.quora.com/Kevin-Wright
twitter: @thecoda

"My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger" ~ Dijkstra
Andrey Popp
Joined: 2010-07-20,
User offline. Last seen 42 years 45 weeks ago.
Re: Scripting with Scala

Oh, it's already here! Well, sorry for spamming mail-list.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland