title: Linux why can't I pipe find result to rm?
body: <p>sorry if this is a noobie question but I can't find a good answer.</p>
  
  <p>To find then remove something I can use</p>
  
  <pre><code>find . -name ".txt" -exec rm "{}" \;
  </code></pre>
  
  <p>But why can't I just pipe the results to rm like </p>
  
  <pre><code>find . -name ".txt" | rm 
  </code></pre>
  
  <p>like I would pipe it to grep</p>
  
  <pre><code>find . -name ".txt" | grep a
  </code></pre>
  
  <p>I've read from somewhere that rm doesn't take input from stdin and therefore I can't pipe it but what does that mean? When I type in rm a.txt it reads from standard input just like I can grep right? Or is there a difference between stdin and command line. Help!</p>