title: Forward a stream from a bash script
body: <p>I have a helper script to debug a server in go, named debug.sh, returning JSON logs, and able to deal with eventual errors (panics, ...)</p>
  <pre><code>!#/bin/sh
  
  go run server.go 2&gt;&amp;1 | jq -Rr '. as $raw | try fromjson catch $raw'
  </code></pre>
  <p>Then when I do ./debug.sh I have my logs printed in a nice way, and errors are catched if any.</p>
  <pre><code>./debug.sh
  {
    &quot;severity&quot;: &quot;info&quot;,
    &quot;message&quot;: &quot;Worker 095d1c8a-5abe-47a3-b945-68be2ded4d83 ready.&quot;
  }
  </code></pre>
  <p>But If want to do an extra processing :</p>
  <pre><code>./debug.sh | jq -r &quot;.message&quot;
  </code></pre>
  <p>I have nothing in output.</p>
  <p>I guess that's because the pipe is blocked in the subscript, and I could just do all the JQ thing from my terminal, but I want the script to be easy to use.</p>
  <p>How can I solve that ?</p>