title: run shell script in program and input parameters
body: <p>I am writing a C++ program for MAC OSX and I have a third parity program "parse" which is for uploading some .js to their server. There are just few cmd line to run in Terminal.</p>
  
  <pre><code>&gt;parse new [folder]
  Login&gt;[email]
  Pw&gt;[pw]
  projectID&gt;[pid]
  </code></pre>
  
  <p>I want to auto. this process in my program, but I don't know how to pack all cmd togather.</p>
  
  <p>when I call <code>system("parse new [folder] &amp;&amp; [email] &amp;&amp; [pw] &amp;&amp; [pid]");</code></p>
  
  <p>the process hold at Login></p>
  
  <p>then I call <code>system("parse new [folder] &amp;&amp; wait &amp;&amp; [email] &amp;&amp; wait &amp;&amp; [pw] &amp;&amp; wait &amp;&amp; [pid]");</code></p>
  
  <p>it still hold at Login> </p>
  
  <p>I would like to ask how can I input parameters for the cmd? thanks</p>