title: How to fork/pipe stdin in bash script?
body: <p>I have a script that I would like to run as</p>
  
  <pre><code>$ myscript &lt; mydata.dat
  </code></pre>
  
  <p>Inside <code>myscript</code> I need to fork/pipe STDIN to multiple destinations</p>
  
  <pre><code>#!/usr/bin/env bash
  
  php script1.php &gt; out1
  php script2.php &gt; out2
  php script3.php &gt; out3
  </code></pre>
  
  <p>Each one needs a copy of STDIN. Is it possible?</p>
  
  <p>Something like </p>
  
  <pre><code># obviously this is broken ...
  STDIN | php script1.php &gt; out1
  STDIN | php script2.php &gt; out2
  STDIN | php script3.php &gt; out3
  </code></pre>