[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42245: grep -l -c does not work like expected
From: |
Volker Raab |
Subject: |
bug#42245: grep -l -c does not work like expected |
Date: |
Tue, 7 Jul 2020 14:48:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
Hi all,
are the options "-l" and "-c" mutually incompatible?
And if so, why?
What happens:
When I enter 'grep -c search *' I get _all_ files listed with the number
of matches (many of them with appended ":0" ).
When I enter 'grep -c search *' I get a list of files which match.
But:
When I enter 'grep -l -c search *' I still get the same result as
without '-c'. (the same happens if I exchange '-l' and '-c')
What I expect:
In the latter case I would expect to get a list of all files that match
with an appended ":xxx' where the xxx denotes the number of matches,
none of which is ":0"
Comment:
Yes, of course I can pipe the result through 'grep -v :0' but this is
clumsy and does not mend that the combination of '-l' and '-c' does not
produce the expected result.
Thanks a lot for considering this in future versions.
Best regards
Volker
pEpkey.asc
Description: application/pgp-keys
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#42245: grep -l -c does not work like expected,
Volker Raab <=