Packages

trait ScriptRunner extends AnyRef

An object that runs Scala code in script files.

For example, here is a complete Scala script on Unix:

#!/bin/sh
exec scala "$0" "$@"
!#
Console.println("Hello, world!")
args.toList foreach Console.println

And here is a batch file example on Windows XP:

::#!
@echo off
call scala %0 %*
goto :eof
::!#
Console.println("Hello, world!")
args.toList foreach Console.println
Source
ScriptRunner.scala
To do

It would be better if error output went to stderr instead of stdout...

Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScriptRunner
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def runScript(script: String, scriptArgs: List[String]): Option[Throwable]

    Run a script file by name, with the given arguments.

    Run a script file by name, with the given arguments.

    returns

    optionally an error, None for success

  2. abstract def runScriptText(script: String, scriptArgs: List[String]): Option[Throwable]

    Run the script text as supplied, with the given arguments.

    Run the script text as supplied, with the given arguments.

    returns

    optionally an error, None for success