title: How do I run a terminal command in a Swift script? (e.g. xcodebuild)
body: <p>I want to replace my CI bash scripts with swift.  I can't figure out how to invoke normal terminal command such as <code>ls</code> or <code>xcodebuild</code></p>
  
  <pre><code>#!/usr/bin/env xcrun swift
  
  import Foundation // Works
  println("Test") // Works
  ls // Fails
  xcodebuild -workspace myApp.xcworkspace // Fails
  </code></pre>
  
  <hr>
  
  <pre><code>$ ./script.swift
  ./script.swift:5:1: error: use of unresolved identifier 'ls'
  ls // Fails
  ^
  ... etc ....
  </code></pre>