From unknown Tue Sep 09 16:39:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11516: sort order Resent-From: e.sambasivarao Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 19 May 2012 06:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11516 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 11516@debbugs.gnu.org X-Debbugs-Original-To: Received: via spool by submit@debbugs.gnu.org id=B.13374087643067 (code B ref -1); Sat, 19 May 2012 06:27:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 May 2012 06:26:04 +0000 Received: from localhost ([127.0.0.1]:33501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVd72-0000n5-IE for submit@debbugs.gnu.org; Sat, 19 May 2012 02:26:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53903) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVbzu-0007Yg-3o for submit@debbugs.gnu.org; Sat, 19 May 2012 01:14:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVbzO-0007ro-Ny for submit@debbugs.gnu.org; Sat, 19 May 2012 01:14:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_50,DEAR_SOMETHING, RCVD_IN_DNSWL_HI, RECEIVED_FROM_WINDOWS_HOST autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVbzO-0007rk-Kf for submit@debbugs.gnu.org; Sat, 19 May 2012 01:14:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVbzN-0004yQ-0H for bug-coreutils@gnu.org; Sat, 19 May 2012 01:14:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVbzL-0007ra-3x for bug-coreutils@gnu.org; Sat, 19 May 2012 01:14:00 -0400 Received: from mail1.licindia.com ([115.113.27.161]:62374 helo=mail.licindia.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVbzK-0007rS-JX for bug-coreutils@gnu.org; Sat, 19 May 2012 01:13:59 -0400 X-TM-IMSS-Message-ID: Received: from LIC-CO-VLP-HB01.licindia.com ([10.240.9.151]) by licindia.com ([10.240.9.200]) with ESMTP (TREND IMSS SMTP Service 7.1) id dacb133400131661 ; Sat, 19 May 2012 10:07:43 +0530 Received: from LIC-SC-HYD-HB01.licindia.com (10.95.0.26) by LIC-CO-VLP-HB01.licindia.com (10.240.9.151) with Microsoft SMTP Server (TLS) id 8.2.176.0; Sat, 19 May 2012 10:09:24 +0530 Received: from 10.83.67.35 (10.83.67.35) by LIC-SC-HYD-HB01.licindia.com (10.95.0.26) with Microsoft SMTP Server id 8.2.176.0; Sat, 19 May 2012 10:09:20 +0530 From: e.sambasivarao Content-Type: text/plain Date: Sat, 19 May 2012 10:10:11 +0530 Message-ID: <1337402411.3951.6.camel@localhost.localdomain> MIME-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-27.rhel4.6) Content-Transfer-Encoding: 7bit X-TM-AS-Product-Ver: IMSS-7.1.0.1394-6.8.0.1017-18914.004 X-TM-AS-Result: No--3.934-4.5-31-1 X-imss-scan-details: No--3.934-4.5-31-1 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP2+, XP SP1+ (seldom 98) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -4.9 (----) X-Mailman-Approved-At: Sat, 19 May 2012 02:25:58 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.9 (----) Dear Sir, By using the following sort command to sort the input file due, the output due is showing as : sort -dfi -k1.11,1.39 -odue due 123180024 BIJJALA ESWARA RAO 1580.50 061233693 BIJJALA JANARDHAN RAO 2280.00 123812394 BIJJALA VENKATESWAR RAO 1682.50 123349123 BIRJALA JANARDHAN RAO 2794.20 123712310 B.KRISHNA MURTHY 2362.50 123234123 B MUTHAIAH 1727.00 038123230 B NAGESWAR RAO 1625.00 121237123 BODA VIJAYA 2827.00 041237267 BODDU APPAIAH 485.60 123123361 BODDU SRINIVASA RAO 4540.00 012316123 BODDU VEERA SWAMY 1527.50 Sorting was on name order (i.e. position 11 to 39) After 4 records i.e after BIRJALA JANARDHAN RAO, we find B.KRISHNA MURTHY where as B.KRISHNA MUTHY, B MUTHAIAH, B NAGESWAR RAO come first in sorted order , kindly guide us. "The information contained in this electronic message and any attachments to this message are intended for exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at LIC OF INDIA or co_mailadmin@licindia.com immediately and destroy all copies of this message and any attachments. The views expressed in this E-mail message / Attachments, are those of the individual sender." From unknown Tue Sep 09 16:39:39 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: e.sambasivarao Subject: bug#11516: closed (Re: bug#11516: sort order) Message-ID: References: <4FB7767A.5010809@draigBrady.com> <1337402411.3951.6.camel@localhost.localdomain> X-Gnu-PR-Message: they-closed 11516 X-Gnu-PR-Package: coreutils Reply-To: 11516@debbugs.gnu.org Date: Sat, 19 May 2012 10:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1337423522-25326-1" This is a multi-part message in MIME format... ------------=_1337423522-25326-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #11516: sort order 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 11516@debbugs.gnu.org. --=20 11516: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11516 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1337423522-25326-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 11516-done) by debbugs.gnu.org; 19 May 2012 10:31:57 +0000 Received: from localhost ([127.0.0.1]:33696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVgx3-0006aF-HX for submit@debbugs.gnu.org; Sat, 19 May 2012 06:31:57 -0400 Received: from mail3.vodafone.ie ([213.233.128.45]:64239) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVgx1-0006Zw-8h for 11516-done@debbugs.gnu.org; Sat, 19 May 2012 06:31:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtsBAEp2t09tTnOv/2dsb2JhbAANOIsvpHqGegQBAQEEMgFGEAsNCwkWDwkDAgECAUUGDQEHAQGFRYIvvGGLBYVNA48pi2OMaQ Received: from unknown (HELO [192.168.1.79]) ([109.78.115.175]) by mail3.vodafone.ie with ESMTP; 19 May 2012 11:31:22 +0100 Message-ID: <4FB7767A.5010809@draigBrady.com> Date: Sat, 19 May 2012 11:31:22 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: "e.sambasivarao" Subject: Re: bug#11516: sort order References: <1337402411.3951.6.camel@localhost.localdomain> In-Reply-To: <1337402411.3951.6.camel@localhost.localdomain> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11516-done Cc: 11516-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: 0.1 (/) On 05/19/2012 05:40 AM, e.sambasivarao wrote: > Dear Sir, > > By using the following sort command to sort the input > file due, the output due is showing as : > > sort -dfi -k1.11,1.39 -odue due > > > > 123180024 BIJJALA ESWARA RAO 1580.50 > 061233693 BIJJALA JANARDHAN RAO 2280.00 > 123812394 BIJJALA VENKATESWAR RAO 1682.50 > 123349123 BIRJALA JANARDHAN RAO 2794.20 > 123712310 B.KRISHNA MURTHY 2362.50 > 123234123 B MUTHAIAH 1727.00 > 038123230 B NAGESWAR RAO 1625.00 > 121237123 BODA VIJAYA 2827.00 > 041237267 BODDU APPAIAH 485.60 > 123123361 BODDU SRINIVASA RAO 4540.00 > 012316123 BODDU VEERA SWAMY 1527.50 > > Sorting was on name order (i.e. position 11 to 39) > After 4 records i.e after BIRJALA JANARDHAN RAO, > we find B.KRISHNA MURTHY where as B.KRISHNA MUTHY, > B MUTHAIAH, B NAGESWAR RAO come first in sorted > order , kindly guide us. Well there are a few things going on here. -d will exclude '.' but include ' ' -f is redundant with -d as -d is a subset of -f (I think) Also your locale make exclude punctuation chars from the search. I.E. cause ' ' to be disregarded in the sort. Now with -d, sort will not treat '.' and ' ' equivalently, or sort in ASCII order. So you have 2 options I think: tr '.' ' ' < due | LANG=C sort -di -k1.11,1.39 > due.sorted LANG=C sort -i -k1.11,1.39 -o due due The former will convert '.' to ' ', while the latter will include non dictionary chars in the sort. cheers, Pádraig. ------------=_1337423522-25326-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 May 2012 06:26:04 +0000 Received: from localhost ([127.0.0.1]:33501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVd72-0000n5-IE for submit@debbugs.gnu.org; Sat, 19 May 2012 02:26:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53903) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVbzu-0007Yg-3o for submit@debbugs.gnu.org; Sat, 19 May 2012 01:14:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVbzO-0007ro-Ny for submit@debbugs.gnu.org; Sat, 19 May 2012 01:14:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_50,DEAR_SOMETHING, RCVD_IN_DNSWL_HI, RECEIVED_FROM_WINDOWS_HOST autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:49076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVbzO-0007rk-Kf for submit@debbugs.gnu.org; Sat, 19 May 2012 01:14:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVbzN-0004yQ-0H for bug-coreutils@gnu.org; Sat, 19 May 2012 01:14:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVbzL-0007ra-3x for bug-coreutils@gnu.org; Sat, 19 May 2012 01:14:00 -0400 Received: from mail1.licindia.com ([115.113.27.161]:62374 helo=mail.licindia.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVbzK-0007rS-JX for bug-coreutils@gnu.org; Sat, 19 May 2012 01:13:59 -0400 X-TM-IMSS-Message-ID: Received: from LIC-CO-VLP-HB01.licindia.com ([10.240.9.151]) by licindia.com ([10.240.9.200]) with ESMTP (TREND IMSS SMTP Service 7.1) id dacb133400131661 ; Sat, 19 May 2012 10:07:43 +0530 Received: from LIC-SC-HYD-HB01.licindia.com (10.95.0.26) by LIC-CO-VLP-HB01.licindia.com (10.240.9.151) with Microsoft SMTP Server (TLS) id 8.2.176.0; Sat, 19 May 2012 10:09:24 +0530 Received: from 10.83.67.35 (10.83.67.35) by LIC-SC-HYD-HB01.licindia.com (10.95.0.26) with Microsoft SMTP Server id 8.2.176.0; Sat, 19 May 2012 10:09:20 +0530 Subject: sort order From: e.sambasivarao To: Content-Type: text/plain Date: Sat, 19 May 2012 10:10:11 +0530 Message-ID: <1337402411.3951.6.camel@localhost.localdomain> MIME-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-27.rhel4.6) Content-Transfer-Encoding: 7bit X-TM-AS-Product-Ver: IMSS-7.1.0.1394-6.8.0.1017-18914.004 X-TM-AS-Result: No--3.934-4.5-31-1 X-imss-scan-details: No--3.934-4.5-31-1 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP2+, XP SP1+ (seldom 98) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 19 May 2012 02:25:58 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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.9 (----) Dear Sir, By using the following sort command to sort the input file due, the output due is showing as : sort -dfi -k1.11,1.39 -odue due 123180024 BIJJALA ESWARA RAO 1580.50 061233693 BIJJALA JANARDHAN RAO 2280.00 123812394 BIJJALA VENKATESWAR RAO 1682.50 123349123 BIRJALA JANARDHAN RAO 2794.20 123712310 B.KRISHNA MURTHY 2362.50 123234123 B MUTHAIAH 1727.00 038123230 B NAGESWAR RAO 1625.00 121237123 BODA VIJAYA 2827.00 041237267 BODDU APPAIAH 485.60 123123361 BODDU SRINIVASA RAO 4540.00 012316123 BODDU VEERA SWAMY 1527.50 Sorting was on name order (i.e. position 11 to 39) After 4 records i.e after BIRJALA JANARDHAN RAO, we find B.KRISHNA MURTHY where as B.KRISHNA MUTHY, B MUTHAIAH, B NAGESWAR RAO come first in sorted order , kindly guide us. "The information contained in this electronic message and any attachments to this message are intended for exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at LIC OF INDIA or co_mailadmin@licindia.com immediately and destroy all copies of this message and any attachments. The views expressed in this E-mail message / Attachments, are those of the individual sender." ------------=_1337423522-25326-1--