title: Run a .sh file from swift?
body: <p>I really need to be able to have a .sh file ran from swift! I looked into t and for some reason people want me to run the shell program <em>in</em> the swift file but it doesn't end up working. I'm trying to run one command, really. The shell command does need argument which is going to be passed into from the app, though. The command I'm trying to run is:</p>
  
  <pre><code>chmod a-x /Applications/the input here
  </code></pre>
  
  <p>I also must be able to take the users input to put the password. How would I input the password?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have already tried:</p>
  
  <pre><code>import Foundation
  let task = NSTask();
  task.launchPath = "/bin/chmod"
  task.arguments = ["a-x /Applications/application.app"]
  
  task.launch()
  </code></pre>
  
  <p>Does anyone have any tips?</p>