GNU bug report logs - #24929
comm enhancement proposal: --print-summary --quiet

Previous Next

Package: coreutils;

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


View this message in rfc822 format

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>, Pádraig Brady <P <at> draigBrady.com>
Cc: 24929 <at> debbugs.gnu.org
Subject: bug#24929: comm enhancement proposal: --print-summary --quiet
Date: Tue, 22 Nov 2016 14:14:09 +0100
[Message part 1 (text/plain, inline)]
On 11/18/2016 10:43 PM, 積丹尼 Dan Jacobson wrote:
> The example is confusing, as it just happens to result in 1 2 3,
> 
> $ printf '%s\n' 1 2 3 4     > file1
> $ printf '%s\n'   2 3 4 5 6 > file2
> $ comm --total -123 file1 file2
> 1       2       3       total
> 
> So please use
> 
> $ printf '%s\n' 0   2 3   5 6       > file1
> $ printf '%s\n'   1 2   4   6 7 8 9 > file2
> $ comm --total -123 file1 file2
> 3       5       2      total

I see the point. I changed the example data to 'a b c ...' which I think
is even easier to read and understand.

> Also add a note "However --total is a GNU extension. For a portable way
> to make totals, use wc:
> 
> $ echo Lines only in 1st = $(comm -23 file1 file2 | wc -l)
> $ echo Lines only in 2nd = $(comm -13 file1 file2 | wc -l)
> $ echo Lines in both =     $(comm -12 file1 file2 | wc -l)

I'll squash in the attached, and push soon.

Thanks & have a nice day,
Berny
[comm-total-doc-amendmend.diff (text/x-patch, attachment)]

This bug report was last modified 6 years and 259 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.