From unknown Tue Jun 24 20:54:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19533: comm does not detect common lines -- Mac OS X 10.9.5 Resent-From: Ali Khanafer Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 07 Jan 2015 21:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19533 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 19533@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.142066653615407 (code B ref -1); Wed, 07 Jan 2015 21:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jan 2015 21:35:36 +0000 Received: from localhost ([127.0.0.1]:39577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8yGN-00040Q-7i for submit@debbugs.gnu.org; Wed, 07 Jan 2015 16:35:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39771) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8y52-0003iI-4r for submit@debbugs.gnu.org; Wed, 07 Jan 2015 16:23:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8y50-0007MS-Ru for submit@debbugs.gnu.org; Wed, 07 Jan 2015 16:23:51 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8y50-0007MM-Op for submit@debbugs.gnu.org; Wed, 07 Jan 2015 16:23:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8y4z-0001YS-F5 for bug-coreutils@gnu.org; Wed, 07 Jan 2015 16:23:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8y4y-0007M6-LT for bug-coreutils@gnu.org; Wed, 07 Jan 2015 16:23:49 -0500 Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:46697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8y4y-0007Ly-AO for bug-coreutils@gnu.org; Wed, 07 Jan 2015 16:23:48 -0500 Received: by mail-la0-f52.google.com with SMTP id hs14so5864281lab.11 for ; Wed, 07 Jan 2015 13:23:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=QdH6naKmzzDGkDhI61twNfoyE0PRL4Jqgz4HzGe7/uw=; b=ESnYVdDV4SBr5GLYtfIOkYjpdgV2Aff/VqeofBwCIITrDLMUYwP8OL/qvhlrOMaJ39 yZiB5onBcd/cr7drj6nHtNTjtt8kTZ9xXZRintIUJ/EhJBLGCzGTDX3/h8Lv6HrldQKI GZy8LwBjay2Ewsz8SozKrrW9VDo4YobfM1+8yJcttdo6dHWDX9peKtt0H6zcQu5FWW6A z/c2A40JaoLuQtQjbxhRdZoXW/Fqg+r1NxdxFLEKL6WBmrmPCnaIVRh+9Lb15zAyZ46i e/p8i5OG5CesWOMwKOAqeuqW+wKh+vQmEN7NdaZPckqu0kkISrlWZd2OJXriCGwiTZvR nkOA== X-Received: by 10.152.87.46 with SMTP id u14mr8467807laz.36.1420665825644; Wed, 07 Jan 2015 13:23:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.208.73 with HTTP; Wed, 7 Jan 2015 13:23:25 -0800 (PST) From: Ali Khanafer Date: Wed, 7 Jan 2015 16:23:25 -0500 Message-ID: Content-Type: multipart/mixed; boundary=001a11c2afd0e1f0a9050c168997 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Wed, 07 Jan 2015 16:35:32 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a11c2afd0e1f0a9050c168997 Content-Type: multipart/alternative; boundary=001a11c2afd0e1f0a4050c168995 --001a11c2afd0e1f0a4050c168995 Content-Type: text/plain; charset=UTF-8 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? Thank you in advance. Best, Ali --001a11c2afd0e1f0a4050c168995 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 li= nes.

Could you please explain why this is happenin= g?

Thank you in advance.

= Best,
Ali


--001a11c2afd0e1f0a4050c168995-- --001a11c2afd0e1f0a9050c168997 Content-Type: application/octet-stream; name=comm-test Content-Disposition: attachment; filename=comm-test Content-Transfer-Encoding: base64 X-Attachment-Id: f_i4n7ov240 TXlNYWM6YWtoYW5hZmVyJCBjb21tIHRlc3QxIHRlc3QyCgkJMTI2NjI4MQoJCTExMzQ4MjgyCgkJ MTU0MzE4NTYKMTYyNjQ4MDMKCQkxNzI0ODEyMQoJCTE3Mzg0MDk5CjE4OTExNDMyCgkyMDUxMzk1 NgoJCTIxNDM2OTYwCgkJMjE2MzQ2MDAKCQkyNDEyOTIwNgoJCTMzNzczNTkyCgkJMzc3MTA3NTIK CQk0NDkwMzQ5MQoxMDM2NTIyOTQKMTAzODY1MDg1CjEyNjMwMjA1NAoxOTg0OTQ2ODQKMjA4NDQy NTI2CjI1MzUzNjM1NwoxMDAyNTEzMTI4CgoJNDY5NTkwMzcKCTUxMjc0MDM4CgkxMDM2NTIyOTQK CTEwMzg2NTA4NQoJMTI2MzAyMDU0CgkyMDg0NDI1MjYKCTI1MzUzNjM1NwoJMTAwMjUxMzEyOA== --001a11c2afd0e1f0a9050c168997 Content-Type: application/octet-stream; name=test2 Content-Disposition: attachment; filename=test2 Content-Transfer-Encoding: base64 X-Attachment-Id: f_i4n7ov2p1 MTI2NjI4MQoxMTM0ODI4MgoxNTQzMTg1NgoxNzI0ODEyMQoxNzM4NDA5OQoyMDUxMzk1NgoyMTQz Njk2MAoyMTYzNDYwMAoyNDEyOTIwNgozMzc3MzU5MgozNzcxMDc1Mgo0NDkwMzQ5MQo0Njk1OTAz Nwo1MTI3NDAzOAoxMDM2NTIyOTQKMTAzODY1MDg1CjEyNjMwMjA1NAoyMDg0NDI1MjYKMjUzNTM2 MzU3CjEwMDI1MTMxMjgK --001a11c2afd0e1f0a9050c168997 Content-Type: application/octet-stream; name=test1 Content-Disposition: attachment; filename=test1 Content-Transfer-Encoding: base64 X-Attachment-Id: f_i4n7ov2x2 MTI2NjI4MQoxMTM0ODI4MgoxNTQzMTg1NgoxNjI2NDgwMwoxNzI0ODEyMQoxNzM4NDA5OQoxODkx MTQzMgoyMTQzNjk2MAoyMTYzNDYwMAoyNDEyOTIwNgozMzc3MzU5MgozNzcxMDc1Mgo0NDkwMzQ5 MQoxMDM2NTIyOTQKMTAzODY1MDg1CjEyNjMwMjA1NAoxOTg0OTQ2ODQKMjA4NDQyNTI2CjI1MzUz NjM1NwoxMDAyNTEzMTI4Cgo= --001a11c2afd0e1f0a9050c168997-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 07 17:12:31 2015 Received: (at control) by debbugs.gnu.org; 7 Jan 2015 22:12:31 +0000 Received: from localhost ([127.0.0.1]:39600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8yq6-0004vj-K2 for submit@debbugs.gnu.org; Wed, 07 Jan 2015 17:12:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59283) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8yq3-0004vV-Q7; Wed, 07 Jan 2015 17:12:28 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t07MCQM0012463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 7 Jan 2015 17:12:27 -0500 Received: from [10.3.113.166] (ovpn-113-166.phx2.redhat.com [10.3.113.166]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t07MCQ8F016211; Wed, 7 Jan 2015 17:12:26 -0500 Message-ID: <54ADAF4A.7080802@redhat.com> Date: Wed, 07 Jan 2015 15:12:26 -0700 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ali Khanafer , 19533-done@debbugs.gnu.org Subject: Re: bug#19533: comm does not detect common lines -- Mac OS X 10.9.5 References: In-Reply-To: OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hurMbIECxHTNkKCxpvLkCWNgJTSwGbIE5" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hurMbIECxHTNkKCxpvLkCWNgJTSwGbIE5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tag 19533 notabug thanks On 01/07/2015 02:23 PM, Ali Khanafer wrote: > Hello, >=20 > Thanks for this amazing tool. >=20 > 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. >=20 > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --hurMbIECxHTNkKCxpvLkCWNgJTSwGbIE5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUra9KAAoJEKeha0olJ0NqaEUH/j6kN0Laj0F8PEjkuOLtsaNp umUi4IPZ8iTWpb9QmOLaoMRQWYRqhMlq34EUpUCgd/9DZSIVK+Gz7rJBd5xwIM45 hd6jzpPJkJ1ylkeVZdKryFtR8C3agsmfkcZ5HaQRQTNMC3JtMxhrleeIsVRkten1 24wizXS8sDucM47TsFa9Mg/IkHWMATCwd9G83MCBnim4vbdNd+Ue3Hkcecta5Z2H geYSW2Uf5BUbg+M/3KmQeNqJ+9PUiKZvYhFs1eg469d1VDbN7xCJGeplAu+m7k5v GUnFj67i9j0o8bRj2m11dvGzWD6lS3O0BLRuUzulu0929ud1oCYhaKyuLUvWWbM= =oUbP -----END PGP SIGNATURE----- --hurMbIECxHTNkKCxpvLkCWNgJTSwGbIE5-- From unknown Tue Jun 24 20:54:15 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ali Khanafer Subject: bug#19533: closed (Re: bug#19533: comm does not detect common lines -- Mac OS X 10.9.5) Message-ID: References: <54ADAF4A.7080802@redhat.com> X-Gnu-PR-Message: they-closed 19533 X-Gnu-PR-Package: coreutils X-Gnu-PR-Keywords: notabug Reply-To: 19533@debbugs.gnu.org Date: Wed, 07 Jan 2015 22:13:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1420668783-19021-1" This is a multi-part message in MIME format... ------------=_1420668783-19021-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #19533: comm does not detect common lines -- Mac OS X 10.9.5 which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 19533@debbugs.gnu.org. --=20 19533: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D19533 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1420668783-19021-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 19533-done) by debbugs.gnu.org; 7 Jan 2015 22:12:31 +0000 Received: from localhost ([127.0.0.1]:39602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8yq7-0004vm-21 for submit@debbugs.gnu.org; Wed, 07 Jan 2015 17:12:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59283) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8yq3-0004vV-Q7; Wed, 07 Jan 2015 17:12:28 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t07MCQM0012463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 7 Jan 2015 17:12:27 -0500 Received: from [10.3.113.166] (ovpn-113-166.phx2.redhat.com [10.3.113.166]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t07MCQ8F016211; Wed, 7 Jan 2015 17:12:26 -0500 Message-ID: <54ADAF4A.7080802@redhat.com> Date: Wed, 07 Jan 2015 15:12:26 -0700 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ali Khanafer , 19533-done@debbugs.gnu.org Subject: Re: bug#19533: comm does not detect common lines -- Mac OS X 10.9.5 References: In-Reply-To: OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hurMbIECxHTNkKCxpvLkCWNgJTSwGbIE5" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 19533-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hurMbIECxHTNkKCxpvLkCWNgJTSwGbIE5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tag 19533 notabug thanks On 01/07/2015 02:23 PM, Ali Khanafer wrote: > Hello, >=20 > Thanks for this amazing tool. >=20 > 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. >=20 > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --hurMbIECxHTNkKCxpvLkCWNgJTSwGbIE5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUra9KAAoJEKeha0olJ0NqaEUH/j6kN0Laj0F8PEjkuOLtsaNp umUi4IPZ8iTWpb9QmOLaoMRQWYRqhMlq34EUpUCgd/9DZSIVK+Gz7rJBd5xwIM45 hd6jzpPJkJ1ylkeVZdKryFtR8C3agsmfkcZ5HaQRQTNMC3JtMxhrleeIsVRkten1 24wizXS8sDucM47TsFa9Mg/IkHWMATCwd9G83MCBnim4vbdNd+Ue3Hkcecta5Z2H geYSW2Uf5BUbg+M/3KmQeNqJ+9PUiKZvYhFs1eg469d1VDbN7xCJGeplAu+m7k5v GUnFj67i9j0o8bRj2m11dvGzWD6lS3O0BLRuUzulu0929ud1oCYhaKyuLUvWWbM= =oUbP -----END PGP SIGNATURE----- --hurMbIECxHTNkKCxpvLkCWNgJTSwGbIE5-- ------------=_1420668783-19021-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Jan 2015 21:35:36 +0000 Received: from localhost ([127.0.0.1]:39577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8yGN-00040Q-7i for submit@debbugs.gnu.org; Wed, 07 Jan 2015 16:35:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39771) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8y52-0003iI-4r for submit@debbugs.gnu.org; Wed, 07 Jan 2015 16:23:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8y50-0007MS-Ru for submit@debbugs.gnu.org; Wed, 07 Jan 2015 16:23:51 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8y50-0007MM-Op for submit@debbugs.gnu.org; Wed, 07 Jan 2015 16:23:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8y4z-0001YS-F5 for bug-coreutils@gnu.org; Wed, 07 Jan 2015 16:23:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8y4y-0007M6-LT for bug-coreutils@gnu.org; Wed, 07 Jan 2015 16:23:49 -0500 Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:46697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8y4y-0007Ly-AO for bug-coreutils@gnu.org; Wed, 07 Jan 2015 16:23:48 -0500 Received: by mail-la0-f52.google.com with SMTP id hs14so5864281lab.11 for ; Wed, 07 Jan 2015 13:23:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=QdH6naKmzzDGkDhI61twNfoyE0PRL4Jqgz4HzGe7/uw=; b=ESnYVdDV4SBr5GLYtfIOkYjpdgV2Aff/VqeofBwCIITrDLMUYwP8OL/qvhlrOMaJ39 yZiB5onBcd/cr7drj6nHtNTjtt8kTZ9xXZRintIUJ/EhJBLGCzGTDX3/h8Lv6HrldQKI GZy8LwBjay2Ewsz8SozKrrW9VDo4YobfM1+8yJcttdo6dHWDX9peKtt0H6zcQu5FWW6A z/c2A40JaoLuQtQjbxhRdZoXW/Fqg+r1NxdxFLEKL6WBmrmPCnaIVRh+9Lb15zAyZ46i e/p8i5OG5CesWOMwKOAqeuqW+wKh+vQmEN7NdaZPckqu0kkISrlWZd2OJXriCGwiTZvR nkOA== X-Received: by 10.152.87.46 with SMTP id u14mr8467807laz.36.1420665825644; Wed, 07 Jan 2015 13:23:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.208.73 with HTTP; Wed, 7 Jan 2015 13:23:25 -0800 (PST) From: Ali Khanafer Date: Wed, 7 Jan 2015 16:23:25 -0500 Message-ID: Subject: comm does not detect common lines -- Mac OS X 10.9.5 To: bug-coreutils@gnu.org Content-Type: multipart/mixed; boundary=001a11c2afd0e1f0a9050c168997 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 07 Jan 2015 16:35:32 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a11c2afd0e1f0a9050c168997 Content-Type: multipart/alternative; boundary=001a11c2afd0e1f0a4050c168995 --001a11c2afd0e1f0a4050c168995 Content-Type: text/plain; charset=UTF-8 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? Thank you in advance. Best, Ali --001a11c2afd0e1f0a4050c168995 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 li= nes.

Could you please explain why this is happenin= g?

Thank you in advance.

= Best,
Ali


--001a11c2afd0e1f0a4050c168995-- --001a11c2afd0e1f0a9050c168997 Content-Type: application/octet-stream; name=comm-test Content-Disposition: attachment; filename=comm-test Content-Transfer-Encoding: base64 X-Attachment-Id: f_i4n7ov240 TXlNYWM6YWtoYW5hZmVyJCBjb21tIHRlc3QxIHRlc3QyCgkJMTI2NjI4MQoJCTExMzQ4MjgyCgkJ MTU0MzE4NTYKMTYyNjQ4MDMKCQkxNzI0ODEyMQoJCTE3Mzg0MDk5CjE4OTExNDMyCgkyMDUxMzk1 NgoJCTIxNDM2OTYwCgkJMjE2MzQ2MDAKCQkyNDEyOTIwNgoJCTMzNzczNTkyCgkJMzc3MTA3NTIK CQk0NDkwMzQ5MQoxMDM2NTIyOTQKMTAzODY1MDg1CjEyNjMwMjA1NAoxOTg0OTQ2ODQKMjA4NDQy NTI2CjI1MzUzNjM1NwoxMDAyNTEzMTI4CgoJNDY5NTkwMzcKCTUxMjc0MDM4CgkxMDM2NTIyOTQK CTEwMzg2NTA4NQoJMTI2MzAyMDU0CgkyMDg0NDI1MjYKCTI1MzUzNjM1NwoJMTAwMjUxMzEyOA== --001a11c2afd0e1f0a9050c168997 Content-Type: application/octet-stream; name=test2 Content-Disposition: attachment; filename=test2 Content-Transfer-Encoding: base64 X-Attachment-Id: f_i4n7ov2p1 MTI2NjI4MQoxMTM0ODI4MgoxNTQzMTg1NgoxNzI0ODEyMQoxNzM4NDA5OQoyMDUxMzk1NgoyMTQz Njk2MAoyMTYzNDYwMAoyNDEyOTIwNgozMzc3MzU5MgozNzcxMDc1Mgo0NDkwMzQ5MQo0Njk1OTAz Nwo1MTI3NDAzOAoxMDM2NTIyOTQKMTAzODY1MDg1CjEyNjMwMjA1NAoyMDg0NDI1MjYKMjUzNTM2 MzU3CjEwMDI1MTMxMjgK --001a11c2afd0e1f0a9050c168997 Content-Type: application/octet-stream; name=test1 Content-Disposition: attachment; filename=test1 Content-Transfer-Encoding: base64 X-Attachment-Id: f_i4n7ov2x2 MTI2NjI4MQoxMTM0ODI4MgoxNTQzMTg1NgoxNjI2NDgwMwoxNzI0ODEyMQoxNzM4NDA5OQoxODkx MTQzMgoyMTQzNjk2MAoyMTYzNDYwMAoyNDEyOTIwNgozMzc3MzU5MgozNzcxMDc1Mgo0NDkwMzQ5 MQoxMDM2NTIyOTQKMTAzODY1MDg1CjEyNjMwMjA1NAoxOTg0OTQ2ODQKMjA4NDQyNTI2CjI1MzUz NjM1NwoxMDAyNTEzMTI4Cgo= --001a11c2afd0e1f0a9050c168997-- ------------=_1420668783-19021-1-- From unknown Tue Jun 24 20:54:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19533: comm does not detect common lines -- Mac OS X 10.9.5 Resent-From: Bob Proulx Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 07 Jan 2015 23:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19533 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: notabug To: 19533@debbugs.gnu.org, ali.khanafer@gmail.com Received: via spool by 19533-submit@debbugs.gnu.org id=B19533.142067156328870 (code B ref 19533); Wed, 07 Jan 2015 23:00:03 +0000 Received: (at 19533) by debbugs.gnu.org; 7 Jan 2015 22:59:23 +0000 Received: from localhost ([127.0.0.1]:39634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8zZS-0007Va-E2 for submit@debbugs.gnu.org; Wed, 07 Jan 2015 17:59:22 -0500 Received: from joseki.proulx.com ([216.17.153.58]:33186) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y8zZQ-0007VR-9K for 19533@debbugs.gnu.org; Wed, 07 Jan 2015 17:59:21 -0500 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id CF8E32182B; Wed, 7 Jan 2015 15:59:18 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id A50822DC45; Wed, 7 Jan 2015 15:59:18 -0700 (MST) Date: Wed, 7 Jan 2015 15:59:18 -0700 From: Bob Proulx Message-ID: <20150107155620727399056@bob.proulx.com> References: <54ADAF4A.7080802@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54ADAF4A.7080802@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Eric Blake wrote: > Ali Khanafer wrote: > > 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: > ... > 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. If you are using bash then a bash specific feature is useful. You can sort them on the fly. comm <(sort test1) <(sort test2) Or perhaps forcing a sort locale. env LC_ALL=C comm <(sort test1) <(sort test2) I included LC_ALL=C to force a specific sort order which may or may not be appropriate for all of your use cases. Bob From unknown Tue Jun 24 20:54:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19533: comm does not detect common lines -- Mac OS X 10.9.5 Resent-From: Ali Khanafer Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 08 Jan 2015 16:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19533 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: notabug To: Bob Proulx Cc: 19533@debbugs.gnu.org Received: via spool by 19533-submit@debbugs.gnu.org id=B19533.142073623612735 (code B ref 19533); Thu, 08 Jan 2015 16:58:02 +0000 Received: (at 19533) by debbugs.gnu.org; 8 Jan 2015 16:57:16 +0000 Received: from localhost ([127.0.0.1]:40359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9GOZ-0003JL-QL for submit@debbugs.gnu.org; Thu, 08 Jan 2015 11:57:16 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:61477) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9GOX-0003JC-ON for 19533@debbugs.gnu.org; Thu, 08 Jan 2015 11:57:14 -0500 Received: by mail-la0-f45.google.com with SMTP id gq15so10277501lab.4 for <19533@debbugs.gnu.org>; Thu, 08 Jan 2015 08:57:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=oeqteNCb8w/Wf1LJaoK0iDImRdObSEM9e7tMOasP+hk=; b=k31c7gEDferJHUgS2HY2U7KKIBtniyseYytLY1vqr1rAA0gmAYWIelg7f3eni0mMoR 1LPA3ofs27RlhNr5Hi3c7qRnSaOoqQ7Vpt6qMX94u05MCLsV0Vo+afNiBUurO8dcLBVd CNXXl+qw46MhrZNWDxi4p37eqsKe65o/S8Yj5C0hwo9FLYR0ogdIaFNSIK7gdHT3ft8c 0tUAxEQvIg+S5kd+h3gzLso78IqqP9H5teDtOlo5SYh/MrY9SLqFrR381oHPoGO+E6x3 yMVwu3HuMze+Ww2YLZME6YkhdWFtv+rMq5sjZ/C73jeyIEEfaHMmLZmnucxwJwgZa7AG 2z9g== X-Received: by 10.112.72.98 with SMTP id c2mr15474891lbv.95.1420736232140; Thu, 08 Jan 2015 08:57:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.208.73 with HTTP; Thu, 8 Jan 2015 08:56:51 -0800 (PST) In-Reply-To: <20150107155620727399056@bob.proulx.com> References: <54ADAF4A.7080802@redhat.com> <20150107155620727399056@bob.proulx.com> From: Ali Khanafer Date: Thu, 8 Jan 2015 11:56:51 -0500 Message-ID: Content-Type: multipart/alternative; boundary=001a11c326da6fb8ba050c26ee1a X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c326da6fb8ba050c26ee1a Content-Type: text/plain; charset=UTF-8 Thanks Eric and Bob. I had sorted the files before calling comm, but I think the problem is that I sorted them as numeric: sort -n test1 -o test1 When I removed the "-n", which is equivalent to what Bob has done, comm worked like a charm. Sorry for rushing to file this as bug. Cheers, Ali On Wed, Jan 7, 2015 at 5:59 PM, Bob Proulx wrote: > Eric Blake wrote: > > Ali Khanafer wrote: > > > 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: > > ... > > 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. > > If you are using bash then a bash specific feature is useful. You can > sort them on the fly. > > comm <(sort test1) <(sort test2) > > Or perhaps forcing a sort locale. > > env LC_ALL=C comm <(sort test1) <(sort test2) > > I included LC_ALL=C to force a specific sort order which may or may > not be appropriate for all of your use cases. > > Bob > --001a11c326da6fb8ba050c26ee1a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Eric and Bob. I had sorted the files before calling= comm, but I think the problem is that I sorted them as numeric:

sort -n test1 -o test1

When I removed the= "-n", which is equivalent to what Bob has done, comm worked like= a charm.

Sorry for rushing to file this as bug.

Cheers,
Ali

On Wed, Jan 7, 2015 at 5:59 PM, Bob= Proulx <bob@proulx.com> wrote:
Eric Blake wrote:
> Ali Khanafer wrote:
> > 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 line= s.
> >
> > Could you please explain why this is happening?
>
> Using a newer version of coreutils would tell you why:
> ...
> Proper use of comm requires that you pre-sort both in= put files.=C2=A0 As
> such, this is not a bug in comm, so I'm closing this bug.=C2=A0 Ho= wever, feel
> free to add further comments or questions.

If you are using bash then a bash specific feature is useful.=C2=A0 = You can
sort them on the fly.

=C2=A0 comm <(sort test1) <(sort test2)

Or perhaps forcing a sort locale.

=C2=A0 env LC_ALL=3DC comm <(sort test1) <(sort test2)

I included LC_ALL=3DC to force a specific sort order which may or may
not be appropriate for all of your use cases.

Bob

--001a11c326da6fb8ba050c26ee1a-- From unknown Tue Jun 24 20:54:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19533: comm does not detect common lines -- Mac OS X 10.9.5 Resent-From: Bob Proulx Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 08 Jan 2015 17:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19533 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: notabug To: Ali Khanafer Cc: 19533@debbugs.gnu.org Received: via spool by 19533-submit@debbugs.gnu.org id=B19533.142073914617431 (code B ref 19533); Thu, 08 Jan 2015 17:46:02 +0000 Received: (at 19533) by debbugs.gnu.org; 8 Jan 2015 17:45:46 +0000 Received: from localhost ([127.0.0.1]:40364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9H9V-0004X4-NX for submit@debbugs.gnu.org; Thu, 08 Jan 2015 12:45:46 -0500 Received: from joseki.proulx.com ([216.17.153.58]:37713) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9H9S-0004Wv-Sa for 19533@debbugs.gnu.org; Thu, 08 Jan 2015 12:45:43 -0500 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 649BB21845; Thu, 8 Jan 2015 10:45:41 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 4DA922DC45; Thu, 8 Jan 2015 10:45:41 -0700 (MST) Date: Thu, 8 Jan 2015 10:45:41 -0700 From: Bob Proulx Message-ID: <20150108104039991165598@bob.proulx.com> References: <54ADAF4A.7080802@redhat.com> <20150107155620727399056@bob.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ali Khanafer wrote: > Thanks Eric and Bob. I had sorted the files before calling comm, but I > think the problem is that I sorted them as numeric: > > sort -n test1 -o test1 > > When I removed the "-n", which is equivalent to what Bob has done, comm > worked like a charm. Yes that would cause the problem. comm is a simple program from years and years ago and expects things to be sorted simply. Sort options in the various programs have come up for discussion every so often. But so far things have continued as they are. The biggest changes in this area have been having the tools produce diagnostic information when the input is not as they expect. Check out the sort --debug option for more useful diagnostics about sorting. Glad things have been /sorted/ out! :-) Bob