title: Grepping stdin and piping to sed does not seem to work
body: <p>I'm trying to filter and replace a standard input in order to capture only specific strings tweaked toward my flavor. For example, say that the standard input string is </p>
  
  <pre><code>"KB: the system ran into a critical error" 
  </code></pre>
  
  <p>Then I will grep this line, change "KB:" into "###", then output to STDOUT such that</p>
  
  <pre><code>"### the system ran into a critical error"
  </code></pre>
  
  <p>I tried in Fedora 12 (and actually in many others)</p>
  
  <pre><code>$ grep "KB:" - | sed -e 's/KB:/###/g'
  KB: the system ran into a critical error &lt;--- This is what I typed in manually.
                                           &lt;--- Nothing is printed
  </code></pre>
  
  <p>I created a text file, text.txt, that contains the same example string, then had <code>grep</code> read from the file like:</p>
  
  <pre><code>$ grep "KB:" text.txt | sed -e 's/KB:/###/g'
  ### the system ran into a critical error &lt;--- Correctly displayed
  $
  </code></pre>
  
  <p>What would be the difference seen from the internals of <code>grep/sed</code> and why the STDIN method does not work? Rather than hear about alternatives like using <code>xargs</code> etc, I want to know why my try should fail.</p>