Paul Eggert <egg...@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