sorry if this is a noobie question but I can't find a good answer.
To find then remove something I can use
find . -name ".txt" -exec rm "{}" \;
But why can't I just pipe the results to rm like
find . -name ".txt" | rm
like I would pipe it to grep
find . -name ".txt" | grep a
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!