title: How to Handle Command Line Prompt from a Cocoa App
body: <p>I am successfully running a command with code from <a href="https://stackoverflow.com/a/12310154/347339">this answer</a>. It works just as advertised, only problem is that I am running a command that waits for user input in the command line. However, I want my Cocoa app to be able to enter the input to allow for the execution to continue. How do I go about doing this?</p>
  
  <p>The command I am running is <code>ln -s -i &lt;path 1&gt; &lt;path 2&gt;</code> which displays the following prompt when <code>&lt;path 2&gt;</code> already exists: <code>replace &lt;path 2&gt;/&lt;path 1&gt;?</code></p>