水曜日, 1月 31, 2007

find and grep with condition OR on the unix(linux)

find . \( -iname \*.pm -or -iname \*.pl \) -print xargs grep -in "package"

so if you use OR. you have to use grouping symbol with find and grep.

case black lists
find . ! \( -iname \*.txt -or -iname \*.jpg -or -iname \*.tsv \) -print xargs grep -in "use"

ラベル: , ,