title: Why doesn't rm work as I expect here?
body: <p>I just want to do a simple thing. I got the following files in a directory:</p>
  
  <pre><code>AppInterface.h  baa  PEMsg.h  PluginInterface.h
  </code></pre>
  
  <p>Then I issue the command:</p>
  
  <pre><code>ls | grep -v ".h" | rm -rf
  </code></pre>
  
  <p>Much to my dismay, <code>baa</code> does not get deleted. But, this:</p>
  
  <pre><code>ls | grep -v ".h"
  </code></pre>
  
  <p>gives <code>baa</code> as I expect. So I guess the problem is with how <code>rm</code> takes input but I don't know why.  Tried this both in csh and bash. </p>