title: Go exec.Command() - run command which contains pipe
body: <p>The following works and prints the command output:</p>
  
  <pre><code>out, err := exec.Command("ps", "cax").Output()
  </code></pre>
  
  <p>but this one fails (with exit status 1):</p>
  
  <pre><code>out, err := exec.Command("ps", "cax | grep myapp").Output()
  </code></pre>
  
  <p>Any suggestions? </p>