From unknown Sun Aug 10 07:14:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6285 <6285@debbugs.gnu.org> To: bug#6285 <6285@debbugs.gnu.org> Subject: Status: a possible bug of "sort -un", it is definitely not caused by language setting Reply-To: bug#6285 <6285@debbugs.gnu.org> Date: Sun, 10 Aug 2025 14:14:11 +0000 retitle 6285 a possible bug of "sort -un", it is definitely not caused by l= anguage setting reassign 6285 coreutils submitter 6285 daimh severity 6285 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu May 27 16:32:10 2010 Received: (at submit) by debbugs.gnu.org; 27 May 2010 20:32:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHjkP-0007QV-Qe for submit@debbugs.gnu.org; Thu, 27 May 2010 16:32:10 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHjig-0007PF-JM for submit@debbugs.gnu.org; Thu, 27 May 2010 16:30:24 -0400 Received: from lists.gnu.org ([199.232.76.165]:46131) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OHjic-0008Iv-Ca for submit@debbugs.gnu.org; Thu, 27 May 2010 16:30:18 -0400 Received: from [140.186.70.92] (port=36354 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHjia-0003eT-SK for bug-coreutils@gnu.org; Thu, 27 May 2010 16:30:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=2.0 required=5.0 tests=BAYES_50,RCVD_NUMERIC_HELO, T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHjiZ-0002gX-Uw for bug-coreutils@gnu.org; Thu, 27 May 2010 16:30:16 -0400 Received: from girlinterrupted.mr.itd.umich.edu ([141.211.14.73]:56707) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHjiZ-0002gC-Q2 for bug-coreutils@gnu.org; Thu, 27 May 2010 16:30:15 -0400 Received: FROM shops1075.mbni.med.umich.edu (mailserv2.mhri.med.umich.edu [141.214.187.242]) By girlinterrupted.mr.itd.umich.edu ID 4BFED655.1F5F4.28828 ; 27 May 2010 16:30:13 EDT Received: from 141.214.186.162 ([141.214.186.162]) by shops1075.mbni.med.umich.edu ([141.214.187.242]) with Microsoft Exchange Server HTTP-DAV ; Thu, 27 May 2010 20:29:34 +0000 Received: from centos.mbni.med.umich.edu by mail.mbni.med.umich.edu; 27 May 2010 16:30:11 -0400 Subject: a possible bug of "sort -un", it is definitely not caused by language setting From: daimh To: bug-coreutils@gnu.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Thu, 27 May 2010 16:30:11 -0400 Message-Id: <1274992211.7824.11.camel@centos.mbni.med.umich.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-19.el5) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.5 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 27 May 2010 16:32:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.5 (----) Hi, echo -e "3\n\n0"|sort -un 0 is missing from output, is this a possible bug? Best, Manhong From debbugs-submit-bounces@debbugs.gnu.org Thu May 27 18:52:48 2010 Received: (at 6285) by debbugs.gnu.org; 27 May 2010 22:52:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHlwV-0008S3-NX for submit@debbugs.gnu.org; Thu, 27 May 2010 18:52:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHlwT-0008Ry-PO for 6285@debbugs.gnu.org; Thu, 27 May 2010 18:52:46 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4RMqfho007222 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 May 2010 18:52:41 -0400 Received: from [10.11.10.115] (vpn-10-115.rdu.redhat.com [10.11.10.115]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4RMqb9o023174; Thu, 27 May 2010 18:52:38 -0400 Message-ID: <4BFEF7A3.3020105@redhat.com> Date: Thu, 27 May 2010 16:52:19 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b1 Mnenhy/0.8.2 Thunderbird/3.0.4 MIME-Version: 1.0 To: daimh Subject: Re: bug#6285: a possible bug of "sort -un", it is definitely not caused by language setting References: <1274992211.7824.11.camel@centos.mbni.med.umich.edu> In-Reply-To: <1274992211.7824.11.camel@centos.mbni.med.umich.edu> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig2EECFB29EB4965FBEB4EB766" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-Spam-Score: -10.1 (----------) X-Debbugs-Envelope-To: 6285 Cc: 6285@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.1 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2EECFB29EB4965FBEB4EB766 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/27/2010 02:30 PM, daimh wrote: > Hi, >=20 > =09 > echo -e "3\n\n0"|sort -un 'echo -e' is inherently non-portable; you should get in the habit of using printf(1) instead. >=20 >=20 > 0 is missing from output, is this a possible bug? Thanks for the report. However, I don't think it is a bug. The empty line, when forced to take on a numeric value, is equivalent to 0. And since you specified unique entries only, sort only printed the empty line (the first of the two matching lines that it encountered). --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig2EECFB29EB4965FBEB4EB766 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL/vekAAoJEKeha0olJ0NqNasH/3Pc5g2ttYMhNgkUK+V5WZw9 hCk2wPxHb0gDIEcWoWodEGwcYpryrJlv6rhi/zf7USo3AaplgajMldLHZQ9WGyYa lfrsxJy+rk0mchl6E0PxdDk/P89/zLNZSxW5Gq3Q2D2Rt/mpjaQ43rR+RsNj2GFQ ZuyTIJv6pj9EWhNnxm/m73j5/28tDeS+iJ5HT2KI7GPo2zbcQOwUWE5ghhTxz8+y PMwaTUfAP4xBxWjbi6o9ztWOIMCpmjtmMHmoV8zBGcMTE+uNOH1uKTEeqiJT/1IG VixMofvE8ScQUYu/m4vIubbUHKD937E3xkXesfdbEbjyx7DgAQdSzB/+tZ9FRk8= =+Fjx -----END PGP SIGNATURE----- --------------enig2EECFB29EB4965FBEB4EB766-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 28 11:52:18 2010 Received: (at 6285) by debbugs.gnu.org; 28 May 2010 15:52:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OI1r8-0007mr-46 for submit@debbugs.gnu.org; Fri, 28 May 2010 11:52:18 -0400 Received: from girlinterrupted.mr.itd.umich.edu ([141.211.14.73]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHzB1-0006WD-Bc for 6285@debbugs.gnu.org; Fri, 28 May 2010 09:00:39 -0400 Received: FROM shops1075.mbni.med.umich.edu (mailserv2.mhri.med.umich.edu [141.214.187.242]) By girlinterrupted.mr.itd.umich.edu ID 4BFFBE71.5910D.26324 ; 28 May 2010 09:00:33 EDT Received: from 141.214.186.162 ([141.214.186.162]) by shops1075.mbni.med.umich.edu ([141.214.187.242]) with Microsoft Exchange Server HTTP-DAV ; Fri, 28 May 2010 12:59:53 +0000 Received: from centos.mbni.med.umich.edu by mail.mbni.med.umich.edu; 28 May 2010 09:00:31 -0400 Subject: Re: bug#6285: a possible bug of "sort -un", it is definitely not caused by language setting From: daimh To: Eric Blake In-Reply-To: <4BFEF7A3.3020105@redhat.com> References: <1274992211.7824.11.camel@centos.mbni.med.umich.edu> <4BFEF7A3.3020105@redhat.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 28 May 2010 09:00:31 -0400 Message-Id: <1275051631.28469.4.camel@centos.mbni.med.umich.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-19.el5) X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 6285 X-Mailman-Approved-At: Fri, 28 May 2010 11:52:17 -0400 Cc: 6285@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Hi Eric, That explained it, thanks a lot for your help! Best, Manhong On Thu, 2010-05-27 at 16:52 -0600, Eric Blake wrote: > On 05/27/2010 02:30 PM, daimh wrote: > > Hi, > > > > > > echo -e "3\n\n0"|sort -un > > 'echo -e' is inherently non-portable; you should get in the habit of > using printf(1) instead. > > > > > > > 0 is missing from output, is this a possible bug? > > Thanks for the report. However, I don't think it is a bug. The empty > line, when forced to take on a numeric value, is equivalent to 0. And > since you specified unique entries only, sort only printed the empty > line (the first of the two matching lines that it encountered). > From debbugs-submit-bounces@debbugs.gnu.org Fri May 28 15:41:14 2010 Received: (at 6285-done) by debbugs.gnu.org; 28 May 2010 19:41:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OI5Qd-0000xY-P6 for submit@debbugs.gnu.org; Fri, 28 May 2010 15:41:13 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OI5Qb-0000xR-Li for 6285-done@debbugs.gnu.org; Fri, 28 May 2010 15:41:10 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.230.115]) by joseki.proulx.com (Postfix) with ESMTP id B3AE221363; Fri, 28 May 2010 13:41:04 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id AA3663CC2E6; Fri, 28 May 2010 13:41:04 -0600 (MDT) Date: Fri, 28 May 2010 13:41:04 -0600 From: Bob Proulx To: daimh Subject: Re: bug#6285: a possible bug of "sort -un", it is definitely not caused by language setting Message-ID: <20100528194104.GA29822@dementia.proulx.com> References: <1274992211.7824.11.camel@centos.mbni.med.umich.edu> <4BFEF7A3.3020105@redhat.com> <1275051631.28469.4.camel@centos.mbni.med.umich.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1275051631.28469.4.camel@centos.mbni.med.umich.edu> User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 6285-done Cc: 6285-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) daimh wrote: > Hi Eric, > That explained it, thanks a lot for your help! > Best, > Manhong Thank you for letting us know. With that information I am going to close the bug report with this message. Bob From unknown Sun Aug 10 07:14:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 26 Jun 2010 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator