title: Write output to a file after piped to jq
body: <p>How can I write a piped output that went through <code>jq</code> to a file in shell</p>
  
  <p>Example:</p>
  
  <pre><code>curl api.example.com | jq &gt; call.txt
  </code></pre>
  
  <p>won't work. Neither does</p>
  
  <pre><code>(curl api.example.com | jq) &gt; call.txt
  </code></pre>
  
  <p>Help!</p>
  
  <p>Edit: So doing <code>curl api.example.com &gt; call.txt</code> works just fine. So it has to do with piping it to <a href="https://github.com/stedolan/jq" rel="noreferrer">jq</a></p>