bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24929: comm enhancement proposal: --print-summary --quiet


From: Bernhard Voelker
Subject: bug#24929: comm enhancement proposal: --print-summary --quiet
Date: Thu, 17 Nov 2016 11:18:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]