Instead of
sort -k2 -k3n
you want to say
sort -k2,2 -k3n
otherwise, you're saying "from 2 to the end"
I don't like the semantics myself, but that's the way it goes.
adj
At 4:00 PM +0200 4/8/02, Andreas Erb wrote:
>Hi,
>while sorting a file I encountered a strange behavior:
>
>sorting this
Hi,
while sorting a file I encountered a strange behavior:
sorting this file
a x 10
d y 1
b z 1
b x 1
c z 4
d x 3
with
sort -k2 -k3n tosort
b x 1
a x 10
d x 3
d y 1
b z 1
c z 4
but should be
b x 1
d x 3
a x 10
d y 1
b z 1
c z 4
Checked with sort 2.0.10 under Linux and 2.0.21 under cygwin
Reg
> sort version 2.0.11, kernel 2.4.0, glibc 2.2 (RedHat 7 plus updates).
>
> sample input:
>
> kernel-2.a
> kernel-2.b
> kernel-ent
> kernelcfg
>
> pass through filter "sort -f"
>
> result:
>
> kernel-2.a
> kernel-2.b
> kernelcfg
> kernel-ent
>
> A rather novel lexigraphical order!
Jim has
sort version 2.0.11, kernel 2.4.0, glibc 2.2 (RedHat 7 plus updates).
sample input:
kernel-2.a
kernel-2.b
kernel-ent
kernelcfg
pass through filter "sort -f"
result:
kernel-2.a
kernel-2.b
kernelcfg
kernel-ent
A rather novel lexigraphical order!
___
Hello,
I am using Linux / Suse 6.3 and I have a problem
with the sort command:
kelter@uk01<9>: echo lll yyy .xxx +zzz | fmt -2 | sort
lll
.xxx
yyy
+zzz
kelter@uk01<10>: which sort
/usr/bin/sort
kelter@uk01<11>: ls -l /usr/bin/sort
-rwxr-xr-x 1 root root29532 Nov 8 1999 /usr/bin