bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

like -c, but without irrelevant 0 match files


From: jidanni
Subject: like -c, but without irrelevant 0 match files
Date: Wed, 16 Sep 2009 00:45:06 +0800

I can't take it any longer. Every time I use -c I get spewed in the face
with irrelevant 0 match files,
$ find News/ -type f -print0|xargs -0 grep -c transgender|wc
    691     861   29102
$ find News/ -type f -print0|xargs -0 grep -c transgender|sed /:0$/d|wc
      9      13     228
Please add some other or additional option to give "like -c, but don't
bother me about 0 match files."

> Just remember to add "sed '/:0$/d'"

Unreasonable. Also the spirit of grep is to show matches, not non-matches.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]