GNU bug report logs - #38908
Bug on comm or sort

Previous Next

Package: coreutils;

Reported by: Saint Michael <venefax <at> gmail.com>

Date: Sat, 4 Jan 2020 00:30:01 UTC

Severity: normal

Tags: notabug

Done: Bernhard Voelker <mail <at> bernhard-voelker.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38908 in the body.
You can then email your comments to 38908 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#38908; Package coreutils. (Sat, 04 Jan 2020 00:30:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Saint Michael <venefax <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 04 Jan 2020 00:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Saint Michael <venefax <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Bug on comm or sort
Date: Fri, 3 Jan 2020 19:28:58 -0500
[Message part 1 (text/plain, inline)]
I am trying to use the comm utility to compare two list of IP addresses,
sorted with regular sort (not -n), and the result is erroneous. I could not
find the answer in Google.

list1=
208.78.161.18
208.78.161.19
208.78.161.20
208.78.161.206
208.78.161.207
208.78.161.21
208.78.161.22
208.78.161.224
208.78.161.226
208.78.161.227

list2
208.78.161.17
208.78.161.18
208.78.161.19
208.78.161.20
208.78.161.206
208.78.161.207
208.78.161.21
208.78.161.22
208.78.161.224
208.78.161.226
This command should work
 comm -12 --check-order <(sort list1.txt) <(sort  list2.txt)
my environment
export LC_ALL=C
export LANG=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"
export LC_COLLATE=C

why these lists are no being compared correctly?
[Message part 2 (text/html, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#38908; Package coreutils. (Sat, 04 Jan 2020 08:52:02 GMT) Full text and rfc822 format available.

Message #8 received at 38908 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Saint Michael <venefax <at> gmail.com>, 38908 <at> debbugs.gnu.org
Subject: Re: bug#38908: Bug on comm or sort
Date: Sat, 4 Jan 2020 09:51:29 +0100
On 2020-01-04 01:28, Saint Michael wrote:
> I am trying to use the comm utility to compare two list of IP addresses,
> sorted with regular sort (not -n), and the result is erroneous. I could not
> find the answer in Google.
> 
> list1=
> 208.78.161.18
> 208.78.161.19
> 208.78.161.20
> 208.78.161.206
> 208.78.161.207
> 208.78.161.21
> 208.78.161.22
> 208.78.161.224
> 208.78.161.226
> 208.78.161.227
> 
> list2
> 208.78.161.17
> 208.78.161.18
> 208.78.161.19
> 208.78.161.20
> 208.78.161.206
> 208.78.161.207
> 208.78.161.21
> 208.78.161.22
> 208.78.161.224
> 208.78.161.226
> This command should work
>  comm -12 --check-order <(sort list1.txt) <(sort  list2.txt)
> my environment
> export LC_ALL=C
> export LANG=en_US.UTF-8
> export LC_CTYPE="en_US.UTF-8"
> export LC_COLLATE=C
> 
> why these lists are no being compared correctly?

Unfortunately, you did not mention the actual output of the
above command (and what exactly you think is wrong with it),
nor did you mention an error message.

Here, it gives (without error):

  $ comm -12 --check-order <(sort list1.txt) <(sort  list2.txt)
  208.78.161.18
  208.78.161.19
  208.78.161.20
  208.78.161.206
  208.78.161.207
  208.78.161.21
  208.78.161.22
  208.78.161.224
  208.78.161.226

which looks good, and BTW is identical with the output of
  $ sort list1.txt list2.txt | uniq -d

Have a nice day,
Berny




Information forwarded to bug-coreutils <at> gnu.org:
bug#38908; Package coreutils. (Sat, 04 Jan 2020 11:46:02 GMT) Full text and rfc822 format available.

Message #11 received at 38908 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Saint Michael <venefax <at> gmail.com>, 38908 <at> debbugs.gnu.org
Subject: Re: bug#38908: Bug on comm or sort
Date: Sat, 4 Jan 2020 12:45:13 +0100
tag 38908 notabug
close 38908
stop

Sent off-list:

On 2020-01-04 12:28, Saint Michael wrote:
> I agree, there is no bug. The issue could not be reproduced in another box. My box had the issue.

Thanks for the confirmation.
I'm therefore closing this issue as not-a-bug in our bug tracker.

Have a nice day,
Berny




Added tag(s) notabug. Request was from Bernhard Voelker <mail <at> bernhard-voelker.de> to control <at> debbugs.gnu.org. (Sat, 04 Jan 2020 11:46:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 38908 <at> debbugs.gnu.org and Saint Michael <venefax <at> gmail.com> Request was from Bernhard Voelker <mail <at> bernhard-voelker.de> to control <at> debbugs.gnu.org. (Sat, 04 Jan 2020 11:46:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Feb 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 79 days ago.

Previous Next


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