bug-coreutils
[Top][All Lists]
Advanced

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

bug#19533: comm does not detect common lines -- Mac OS X 10.9.5


From: Eric Blake
Subject: bug#19533: comm does not detect common lines -- Mac OS X 10.9.5
Date: Wed, 07 Jan 2015 15:12:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

tag 19533 notabug
thanks

On 01/07/2015 02:23 PM, Ali Khanafer wrote:
> Hello,
> 
> Thanks for this amazing tool.
> 
> I tried comm on test1.txt and test2.txt. The output I got is in
> comm-test.txt. Comm found 11 common lines and missed 6 other lines.
> 
> Could you please explain why this is happening?

Using a newer version of coreutils would tell you why:

$ comm test1 test2
                1266281
                11348282
                15431856
16264803
                17248121
                17384099
18911432
        20513956
                21436960
                21634600
                24129206
                33773592
                37710752
                44903491
comm: file 1 is not in sorted order
103652294
103865085
126302054
198494684
208442526
253536357
1002513128

        46959037
        51274038
comm: file 2 is not in sorted order
        103652294
        103865085
        126302054
        208442526
        253536357
        1002513128

Proper use of comm requires that you pre-sort both input files.  As
such, this is not a bug in comm, so I'm closing this bug.  However, feel
free to add further comments or questions.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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