Skip to main content
2 of 3
formatting; grammar; inserted actual error message
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k

giving grep output to rm

I'm trying to pipe grep output to rm, but it outputs useless stuff. Is any switch required for rm? Or can rm can be provided a regexp directly?

$ ls | grep '^Dar' |rm rm: missing operand Try `rm --help' for more information.