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: Pádraig Brady <P <at> draigBrady.com>, 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>, 24929 <at> debbugs.gnu.org
Subject: bug#24929: comm enhancement proposal: --print-summary --quiet
Date: Thu, 17 Nov 2016 11:18:21 +0100
On 11/17/2016 11:12 AM, Pádraig Brady wrote:
> 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.

You mean to change the --total flag to accept an argument?

  $ echo Lines in both = $(    comm -123 --total=3 file1 file2)
  $ echo Lines only in 1st = $(comm -123 --total=1 file1 file2)
  $ echo Lines only in 2nd = $(comm -123 --total=2 file1 file2)

and

  $ echo Lines only in 1st or 2nd = $(comm -123 --total=1,2 file1 file2)

?

Have a nice day,
Berny




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.