From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 03:36:21 2010 Received: (at submit) by debbugs.gnu.org; 15 Nov 2010 08:36:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHuXw-0005R1-Q4 for submit@debbugs.gnu.org; Mon, 15 Nov 2010 03:36:21 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHuBo-0005Gl-LO for submit@debbugs.gnu.org; Mon, 15 Nov 2010 03:13:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHuGZ-0002tS-Vb for submit@debbugs.gnu.org; Mon, 15 Nov 2010 03:18:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: **** X-Spam-Status: No, score=4.5 required=5.0 tests=BAYES_99,HTML_FONT_FACE_BAD, HTML_MESSAGE,T_RP_MATCHES_RCVD autolearn=no version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:57555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHuGZ-0002tN-R3 for submit@debbugs.gnu.org; Mon, 15 Nov 2010 03:18:19 -0500 Received: from [140.186.70.92] (port=38013 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHuGW-0006FL-OL for bug-coreutils@gnu.org; Mon, 15 Nov 2010 03:18:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHuGS-0002s6-DJ for bug-coreutils@gnu.org; Mon, 15 Nov 2010 03:18:16 -0500 Received: from mail.sinofriends.com ([202.96.155.86]:33113 helo=sinofriends.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHuGQ-0002r0-Vb for bug-coreutils@gnu.org; Mon, 15 Nov 2010 03:18:12 -0500 Received: from ibmusere2143eb (unknown [218.17.181.82]) by mail.sinofriends.com (Postfix) with ESMTP id ACD3B4FC8ED for ; Mon, 15 Nov 2010 16:18:02 +0800 (CST) From: =?gb2312?B?u8a2q8+y?= To: Subject: about the order result of the sort command Date: Mon, 15 Nov 2010 16:17:54 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000E_01CB84E0.A8896B30" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcuEnZoxs4DDELvDQvWhvSOlW/6L3g== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Message-Id: <20101115081802.ACD3B4FC8ED@mail.sinofriends.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 15 Nov 2010 03:36:15 -0500 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.5 (-) This is a multi-part message in MIME format. ------=_NextPart_000_000E_01CB84E0.A8896B30 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 W2h1YW5nZG9uZ3hpQGxvY2FsaG9zdCB+XSQgZWNobyAiMTAwMTY2MSAyNzcNCg0KPiAxMDAxNjYy IDg4OA0KDQo+IDEwMDE2NiA3MyIgfCBzb3J0DQoNCjEwMDE2NjEgMjc3DQoNCjEwMDE2NjIgODg4 DQoNCjEwMDE2NiA3Mw0KDQogDQoNCkl0IHNob3VsZCBiZQ0KDQoxMDAxNjYgNzMNCg0KMTAwMTY2 MSAyNzcNCg0KMTAwMTY2MiA4ODgNCg0KIA0KDQogDQoNCkl0IGlzIGRpZmZlcmVudCBmcm9tIHRo ZSBzb3J0IG9yZGVyIG9mIHRoZSChsGpvaW6hsSBjb21tYW5kLg0KDQogDQoNCiANCg0KVGVsOiAw NzU1o604NjY3NjI2OSwgMTM1MTA2MTA5ODINCg0KRW1haWw6ZG9uZ3hpLmh1YW5nIDxCTE9DS0VE OjptYWlsdG86LnplbmdAc2lub2ZyaWVuZHMuY29tPiBAc2lub2ZyaWVuZHMuY29tDQoNCg0K1eSw rrmry77W0NPRvK/Nxcbsz8K5q8u+DQpaaGVuYWkgSW5jLixhIFNpbm9GcmllbmRzIEluYy4gQ29t cGFueQ0KDQoNCs341rejuiA8QkxPQ0tFRDo6aHR0cDovL3d3dy56aGVuYWkuY29tLz4gd3d3Lnpo ZW5haS5jb20NCrXY1rejusnu29rK0L/GvLzUsLGxx/jAysm9wrcxMbrFzay3vdDFz6K420HX+cj9 wqUNCrXnu7CjujA3NTWjrTg2Mjk2MzMz08qx4KO6NTE4MDU3DQoNCg0KIA0KDQoNCrG+08q8/ryw xuS4vbz+xNrI3b75yvTT2tbQ09G8r83FuavLvrGjw9zQxc+io6zH68rVvP7Iy8nGvqGxo8Pc1q7S 5c7xoaMNCs60vq3Q7b/Jo6zH687wz/LIzrrOzt652LXEy/vIy9C5wqmhoteqt6Khori01sahosmi sryhorvy1MrQ7cq508OxvtPKvP7QxQ0Kz6Kho8jnufvE+rTtytXBy7G+08q8/qOsx+u8tL/MzajW qreivP7Iy6OssqLJvrP9sb7Tyrz+oaMNCg0KIA0KDQogDQoNCg== ------=_NextPart_000_000E_01CB84E0.A8896B30 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable

[huangdongxi@localhost ~]$ echo "1001661 = 277

> 1001662 888

> 100166 73" | = sort

1001661 = 277

1001662 = 888

100166 = 73

 

It should be

100166 = 73

1001661 = 277

1001662 = 888

 

 

It is different from the sort order of the = =A1=B0join=A1=B1 command.

 

 

Tel: 0755=A3=AD86676269, 13510610982

Email:dongxi.huang@sinofriends.com<= /span>

=D5=E4= =B0=AE=B9=AB=CB=BE=D6=D0= =D3=D1=BC=AF=CD=C5=C6=EC=CF=C2=B9=AB=CB=BE
Zhenai = Inc.,a SinoFriends Inc. Company

=CD=F8=D6=B7= =A3=BAwww.zhenai.com<= /a>
=B5=D8=D6=B7=A3=BA=C9=EE= =DB=DA=CA=D0=BF=C6=BC=BC=D4=B0=B1=B1=C7=F8=C0=CA=C9=BD=C2=B711=BA=C5=CD=AC= =B7=BD=D0=C5=CF=A2=B8=DBA=D7=F9=C8=FD= =C2=A5
=B5=E7=BB=B0=A3=BA0755=A3=AD86296333=D3=CA=B1=E0<= /b>=A3=BA518057

 =

=B1=BE=D3=CA= =BC=FE=BC=B0=C6=E4=B8=BD=BC=FE=C4=DA=C8=DD=BE=F9=CA=F4=D3=DA=D6=D0=D3=D1=BC= =AF=CD=C5=B9=AB=CB=BE=B1=A3=C3=DC=D0=C5=CF=A2=A3=AC=C7=EB=CA=D5=BC=FE=C8=CB= =C9=C6=BE=A1=B1=A3=C3=DC=D6=AE=D2=E5=CE=F1=A1=A3
=CE=B4=BE=AD=D0=ED=BF=C9=A3=AC=C7=EB= =CE=F0=CF=F2=C8=CE=BA=CE=CE=DE=B9=D8=B5=C4=CB=FB=C8=CB=D0=B9=C2=A9=A1=A2=D7= =AA=B7=A2=A1=A2=B8=B4=D6=C6=A1=A2=C9=A2=B2=BC=A1=A2=BB=F2=D4=CA=D0=ED=CA=B9= =D3=C3=B1=BE=D3=CA=BC=FE=D0=C5
=CF=A2=A1=A3=C8=E7=B9=FB=C4=FA=B4=ED= =CA=D5=C1=CB=B1=BE=D3=CA=BC=FE=A3=AC=C7=EB=BC=B4=BF=CC=CD=A8=D6=AA=B7=A2=BC= =FE=C8=CB=A3=AC=B2=A2=C9=BE=B3=FD=B1=BE=D3=CA=BC=FE=A1=A3

 

 

------=_NextPart_000_000E_01CB84E0.A8896B30-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 11:18:37 2010 Received: (at 7407) by debbugs.gnu.org; 15 Nov 2010 16:18:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PI1lM-0000hK-Ou for submit@debbugs.gnu.org; Mon, 15 Nov 2010 11:18:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PI1lH-0000hA-4Q for 7407@debbugs.gnu.org; Mon, 15 Nov 2010 11:18:35 -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.13.8/8.13.8) with ESMTP id oAFGNRZx022940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 15 Nov 2010 11:23:27 -0500 Received: from [10.3.113.7] ([10.3.113.7]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAFGNQNT001180; Mon, 15 Nov 2010 11:23:27 -0500 Message-ID: <4CE15E7E.9000108@redhat.com> Date: Mon, 15 Nov 2010 09:23:26 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6 MIME-Version: 1.0 To: =?GB2312?B?u8a2q8+y?= Subject: Re: bug#7407: about the order result of the sort command References: <20101115081802.ACD3B4FC8ED@mail.sinofriends.com> In-Reply-To: <20101115081802.ACD3B4FC8ED@mail.sinofriends.com> X-Enigmail-Version: 1.1.2 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig7237D2D10B124925B4D7503D" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -10.2 (----------) X-Debbugs-Envelope-To: 7407 Cc: 7407@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.2 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7237D2D10B124925B4D7503D Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable On 11/15/2010 01:17 AM, =BB=C6=B6=AB=CF=B2 wrote: > [huangdongxi@localhost ~]$ echo "1001661 277 >=20 >> 1001662 888 >=20 >> 100166 73" | sort >=20 > 1001661 277 >=20 > 1001662 888 >=20 > 100166 73 Thanks for the report. However, this is most likely not a bug in sort, but in your expectations. This is a FAQ, and is probably due to your locale: http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-o= rder_0021 Using the new 'sort --debug' feature of coreutils 8.7 shows: $ echo "1001661 277 1001662 888 100166 73" | sort --debug sort: using `en_US.UTF-8' sorting rules 1001661 277 ___________ 1001662 888 ___________ 100166 73 _________ $ echo "1001661 277 1001662 888 100166 73" | LC_ALL=3DC sort --debug sort: using simple byte comparison 100166 73 _________ 1001661 277 ___________ 1001662 888 ___________ Remember, many non-C locales ignore whitespace in collation rules. >=20 > It is different from the sort order of the =A1=B0join=A1=B1 command. Reread 'join --help': > Important: FILE1 and FILE2 must be sorted on the join fields.= E.g., > use ` sort -k 1b,1 ' if `join' has no options, or use ` join -t = '' ' if > `sort' has no options. Note, comparisons honor the rules speci= fied by > `LC_COLLATE'. If the input is not sorted and some lines can= not be > joined, a warning message will be given. If you correctly sorted with -k 1b,1 (or if you correctly used join -t ''), then you will get consistent results for your current locale (whether or not you also choose to change things to require LC_ALL=3DC). --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig7237D2D10B124925B4D7503D 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.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJM4V5+AAoJEKeha0olJ0NqGv0H/j5I/v60T1EVyqKJ8YiGBxbj cu/fnPscFQ3Uc7yNQyxg3s3czh5XOiyXjkW//RsoApGcMZUebYkVI/n0MX9Eq87R JMKPpJ/JlMOfyzby6WLI0aDxGeBzu+MSJ6veXpzNYviDTyQRcooKRrKsoN1spiv0 Gb4Q8RokmKWKBNej4FoalaaZHeWVmItWeMfPOukUCp4Bf5ECXdLZinwtMvWNCWGB Qx3WMLBT6uwte3JwBlICBf6vZ5n8ZvgIbEzsmdMgAPWB61ZpE82rlcR96JhoLaXz dBTmDRq34DZ6eR+npoeZbmSEkO+bpkRTOfHyLim9aVzpEj0v8FKt3BF/LgY5Iyg= =HpIl -----END PGP SIGNATURE----- --------------enig7237D2D10B124925B4D7503D-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 11:48:41 2010 Received: (at 7407-done) by debbugs.gnu.org; 15 Nov 2010 16:48:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PI2ES-0000tJ-Tp for submit@debbugs.gnu.org; Mon, 15 Nov 2010 11:48:41 -0500 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1PI2ER-0000tE-K1 for 7407-done@debbugs.gnu.org; Mon, 15 Nov 2010 11:48:40 -0500 Received: (qmail 56175 invoked from network); 15 Nov 2010 16:53:35 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 15 Nov 2010 16:53:35 -0000 Message-ID: <4CE16572.4080307@draigBrady.com> Date: Mon, 15 Nov 2010 16:53:06 +0000 From: =?GB2312?B?UKiiZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#7407: about the order result of the sort command References: <20101115081802.ACD3B4FC8ED@mail.sinofriends.com> <4CE15E7E.9000108@redhat.com> In-Reply-To: <4CE15E7E.9000108@redhat.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7407-done Cc: 7407-done@debbugs.gnu.org, =?GB2312?B?u8a2q8+y?= 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.7 (--) On 15/11/10 16:23, Eric Blake wrote: > On 11/15/2010 01:17 AM, »Æ¶«Ï² wrote: >> >> It is different from the sort order of the ¡°join¡± command. > > Reread 'join --help': > >> Important: FILE1 and FILE2 must be sorted on the join fields. E.g., >> use ` sort -k 1b,1 ' if `join' has no options, or use ` join -t '' ' if >> `sort' has no options. Note, comparisons honor the rules specified by >> `LC_COLLATE'. If the input is not sorted and some lines cannot be >> joined, a warning message will be given. > > If you correctly sorted with -k 1b,1 (or if you correctly used join -t > ''), then you will get consistent results for your current locale > (whether or not you also choose to change things to require LC_ALL=C). join -t '' is a recent addition, with join -t '\0' being the old way to achieve the same. I'm marking this done as from the example the poster seems to want: sort -k 1b,1 cheers, P¨¢draig. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 20:51:58 2010 Received: (at 7407-done) by debbugs.gnu.org; 16 Nov 2010 01:51:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PIAiE-0006QC-AL for submit@debbugs.gnu.org; Mon, 15 Nov 2010 20:51:58 -0500 Received: from mail.sinofriends.com ([202.96.155.86] helo=sinofriends.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PIAiB-0006Q7-Do for 7407-done@debbugs.gnu.org; Mon, 15 Nov 2010 20:51:56 -0500 Received: from ibmusere2143eb (unknown [218.17.181.82]) by mail.sinofriends.com (Postfix) with ESMTP id 67FF94FC8A1; Tue, 16 Nov 2010 09:56:51 +0800 (CST) From: =?gb2312?B?u8a2q8+y?= To: =?gb2312?B?J1CoomRyYWlnIEJyYWR5Jw==?= , "'Eric Blake'" Subject: reply: bug#7407: about the order result of the sort command Date: Tue, 16 Nov 2010 09:56:42 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcuE5adWs+2TZA/ORIGbNAnjrw4cmQAS7CSQ In-Reply-To: <4CE16572.4080307@draigBrady.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 Message-Id: <20101116015651.67FF94FC8A1@mail.sinofriends.com> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 7407-done Cc: 7407-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.2 (--) Get it, thank you for your help. :) -----=D3=CA=BC=FE=D4=AD=BC=FE----- =B7=A2=BC=FE=C8=CB: P=A8=A2draig Brady [mailto:P@draigBrady.com]=20 =B7=A2=CB=CD=CA=B1=BC=E4: 2010=C4=EA11=D4=C216=C8=D5 0:53 =CA=D5=BC=FE=C8=CB: Eric Blake =B3=AD=CB=CD: =BB=C6=B6=AB=CF=B2; 7407-done@debbugs.gnu.org =D6=F7=CC=E2: Re: bug#7407: about the order result of the sort command On 15/11/10 16:23, Eric Blake wrote: > On 11/15/2010 01:17 AM, =BB=C6=B6=AB=CF=B2 wrote: >> >> It is different from the sort order of the =A1=B0join=A1=B1 command. >=20 > Reread 'join --help': >=20 >> Important: FILE1 and FILE2 must be sorted on the join = fields. E.g., >> use ` sort -k 1b,1 ' if `join' has no options, or use ` join = -t '' ' if >> `sort' has no options. Note, comparisons honor the rules specified by >> `LC_COLLATE'. If the input is not sorted and some lines cannot be >> joined, a warning message will be given. >=20 > If you correctly sorted with -k 1b,1 (or if you correctly used join -t > ''), then you will get consistent results for your current locale > (whether or not you also choose to change things to require = LC_ALL=3DC). join -t '' is a recent addition, with join -t '\0' being the old way to achieve the same. I'm marking this done as from the example the poster seems to want: sort = -k 1b,1 cheers, P=A8=A2draig. From unknown Mon Aug 11 18:18:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 14 Dec 2010 12: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