GNU bug report logs -
#70540
grep -c -r | grep -v ':0$'
Previous Next
Full log
Message #14 received at 70540 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert <eggert <at> cs.ucla.edu> writes:
> On 4/23/24 11:32 AM, Dale R. Worley wrote:
>> However, it seems "natural" to me that "grep -c -l", that is, "grep
>> --count --files-with-matches", should give me this result.
>
> Yes, that sounds reasonable. Is your patch a trivial one (10 lines or
> less)? If so, please send it in. If not, please send in copyright
> paperwork for grep (I can send you the form for that). Thanks.
The functional code is a bit less than 10 lines, but adding in comments
and updates to the tests it's significantly longer. So send me the
form.
One further thing, I haven't written any updates to the manual page or
.texi. Does anyone have suggestions for a good way to do that?
Also, the code change does *not* implement --count
--files-without-match. In a sense, that ought to become defined also,
but the output would be the same as for --files-without-match with each
file name getting ":0" appended, which seems not worth the trouble of
implementing.
Dale
This bug report was last modified 1 year and 47 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.