[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in sort?? using the C character offset in the second column...
From: |
Neville address@hidden |
Subject: |
Bug in sort?? using the C character offset in the second column... |
Date: |
Thu, 14 Apr 2005 01:59:53 +0800 |
Hi...
$ echo "= =Apr,= =Mar,= =May" | tr "," "\012" | sort -k 2.2,2.5M
= =Apr
= =Mar
= =May
$ echo "= Apr,= Mar,= May" | tr "," "\012"| sort -k 2.2,2.4M
= Mar
= Apr
= May
Looks like the offset is just getting ignored...
Using old fashion sort arguments....
$ echo "= =Apr,= =Mar,= =May" | tr "," "\012" | sort +1.1M -1.4
= =Apr
= =Mar
= =May
$ echo "= Apr,= Mar,= May" | tr "," "\012" | sort +1.1M -1.4
= Mar
= Apr
= May
Here is what I am running, Fedora Core2:
$ rpm -qf /bin/sort
coreutils-5.2.1-7
$ uname -a
Linux november.3ttechnology.com 2.6.8-1.521custom #2 Thu Sep 23 17:15:56
SGT 2004 i686 i686 i386 GNU/Linux
I do have a more recent kernel, but I don't think that will change
sort...
NevilleDNZ
ps. Also give problems with -n numeric, eg 01 010 02 dont sort,
eg:
$ echo "= =01,= =010,= =02" | tr "," "\012" | sort +1.1n -1.4
= =01
= =010
= =02
$ echo "= 01,= 010,= 02" | tr "," "\012" | sort +1.1n -1.4
= 01
= 02
= 010
Sorry if this is a misreport. I got to go to bed.
--
- Bug in sort?? using the C character offset in the second column...,
Neville address@hidden <=