grep - Patches: patch #7577, `grep -lc' to show only matching...
You are not allowed to post comments on this tracker with your current authentication level.
patch #7577: `grep -lc' to show only matching files
Submitter: | Santiago Ruano Rincón <santiago> | ||
Submitted: | Wed 13 Jul 2011 11:56:25 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | In Progress | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Wed 10 Aug 2011 07:17:37 PM UTC, comment #4: |
Santiago Ruano Rincón <santiago> |
Thu 14 Jul 2011 09:07:52 AM UTC, comment #3: I'm inclined of including https://savannah.gnu.org/patch/index.php?6588 instead, with a -M command line so that you can achieve the result with grep -cM1. This has the advantage that the interaction with -v is clearer, too.
|
Paolo Bonzini <bonzini> |
Thu 14 Jul 2011 09:05:06 AM UTC, comment #2: I don't understand what you mean by "garbled output from both options". "grep -lc" here gives exactly the same output as "grep -l". I understand why the patch is nice to have, but personally I would never have thought of specifying them together. :)
|
Paolo Bonzini <bonzini> |
Thu 14 Jul 2011 12:00:50 AM UTC, comment #1: According to POSIX,
|
Eric Blake <ericb> |
Wed 13 Jul 2011 11:56:25 PM UTC, original submission:
Peter Samuelson has submitted a patch to Debian to modify the behavior of `grep -lc'. Copying what he wrote in http://bugs.debian.org/76011
|
Santiago Ruano Rincón <santiago> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2011-07-14 | bonzini | Status | None | In Progress | |
2011-07-13 | santiago | Attached File | - | Added grep-lc.patch, #23650 |
Powered by Savane 3.13-3230.
Corresponding source code
Two people filled different bugs in debian asking for the same behavior from grep -lc, and, with my user's hat put on, I found the combination of --count and --files-with-matches clear. grep's man page doesn't say that those options only print matching count or file' names, as grep --help tries to say. Man page either says that those control output options cannot be used together (Maybe it should?).
However, in the name of standards, I'd prefer '-c --min-count' to achieve that behavior. So I agree with you, and this patch shouldn't be considered.
Santiago