GNU bug report logs -
#11516
sort order
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11516 in the body.
You can then email your comments to 11516 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#11516
; Package
coreutils
.
(Sat, 19 May 2012 06:27:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
e.sambasivarao <e.sambasivarao <at> licindia.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Sat, 19 May 2012 06:27:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <at> 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."
Reply sent
to
Pádraig Brady <P <at> draigBrady.com>
:
You have taken responsibility.
(Sat, 19 May 2012 10:32:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
e.sambasivarao <e.sambasivarao <at> licindia.com>
:
bug acknowledged by developer.
(Sat, 19 May 2012 10:32:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 11516-done <at> debbugs.gnu.org (full text, mbox):
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.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 16 Jun 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.