Take a look at the standard scala.sys package
This package was added in Scala 2.9 and contains utilities ported from the compiler and sbt to help with system tasks and scripts. It contains access to system properties, environment variables, runtime, threads, and last, but not least, processes using Scala ProcessBuilder and other tools.
For scripting, you can also look at scalax Scala-io libraries, which can soon be distributed with Scala. These libraries support good abstractions for I / O, file systems, paths and files, and they also use automatic resource management, path sets, global usage, and other useful features.
source share