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 '^\[Daruchini'| rm
rm: missing operand Try `rm --help' for more information.
You need to use
(Beware of special characters in filenames; with GNU grep, you might prefer
Also, while the shell doesn't use regexps, that's a simple pattern:
(meanwhile, I think I need more sleep.)
Here, it's very simple to get the shell to filter the files you want. Note that it's the shell that's expanding the pattern
In more complex cases, look up the