title: How to Run Bash Script for Scala
body: <p>I'm breaking myself into Scala. I got "Hello, World" to echo on the terminal. WOOT!</p>
  
  <p>Here's my new problem: Run <code>rails new &lt;app&gt;</code> by running it with scala. Improvement: It will <code>cd</code> into the <code>&lt;app&gt;</code> folder it will make and then run <code>git init</code> for you.</p>
  
  <p>This is my problem and I want to make the bash script with Scala.</p>
  
  <p>Here was my Hello World script (complete copy from scala lang):</p>
  
  <pre><code>#!/bin/sh
  exec scala "$0" "$@"
  !#
  object HelloWorld extends App {
    println("Hello, World")
  }
  HelloWorld.main(args)
  </code></pre>
  
  <p>Does anyone know how to do this? Or how I could at least run <code>ls</code> with the terminal?</p>
  
  <p>Also, is there a way to handle errors with a bash script?</p>