Hi, I am trying to delete files by piping the output from ls to egrep to rm :
ls | egrep '(cd|CD)' | rm I then get an error saying to few arguments to rm so I tried ls | egrep '(cd|CD)' | rm -f I get no errors but nothing is deleted the output of ls | egrep '(cd|CD)' is [paulb@malloc Documents]$ ls | egrep '(cd|CD)' cd-1.0.tgz cd.cls cd.dtx cd.dvi cd.ins CDList.tex cd.pdf CD.tex What am I doing wrong?
