title: How to stop sed from buffering?
body: <p>I have a program that writes to fd3 and I want to process that data with grep and sed.  Here is how the code looks so far:</p>
  
  <pre><code>
  exec 3> >(grep "good:"|sed -u "s/.*:\(.*\)/I got: \1/")
  echo "bad:data1">&3
  echo "good:data2">&3
  </code></pre>
  
  <p>Nothing is output until I do a</p>
  
  <p><code>exec 3&gt;&amp;-</code></p>
  
  <p>Then, everything that I wanted finally arrives as I expected:</p>
  
  <pre>
  I got: data2
  </pre>
  
  <p>It seems to reply immediately if I use only a grep or only a sed, but mixing them seems to cause some sort of buffering.  How can I get immediate output from fd3?</p>