GNU bug report logs -
#24929
comm enhancement proposal: --print-summary --quiet
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Sat, 12 Nov 2016 09:46:02 UTC
Severity: normal
Tags: fixed
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 24929 <at> debbugs.gnu.org (full text, mbox):
On 17/11/16 02:51, Bernhard Voelker wrote:
> On 11/12/2016 12:24 AM, 積丹尼 Dan Jacobson wrote:
>> Please add [...]
>
>> --print-summary
>> Print totals at end.
>>
>> --quiet
>> Suppress file content output.
>
> Just for fun (...), I've put the requested functionality into the
> attached patch.
>
> I'm only 60:40 for adding this to coreutils, as this may be considered
> as feature creep bloating the code; OTOH the size of the additional
> code it not so scaring, so I'll leave the decision up to the other CU
> maintainers.
>
> BTW: --quiet is not needed, because you can use "-123". ;-)
Usually you'd want counts separately from each other
and separate from the data itself, in which case wc -l suffices:
$ echo Lines in both = $(comm -12 file1 file2 | wc -l)
$ echo Lines only in 1st = $(comm -23 file1 file2 | wc -l)
$ echo Lines only in 2nd = $(comm -13 file1 file2 | wc -l)
So this is in the efficiency/convenience category.
I'm 50:50 on it (which means it goes in without further feedback).
thanks for the patch!
Pádraig.
This bug report was last modified 6 years and 258 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.