Re: Error in sort

Andrew D Jewell <[email protected]>
Newsgroups gmane.comp.gnu.textutils.bugs
Message-ID <a05101500b8d7779d60d6@[65.29.220.201]>
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 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
>
>Regards
>Hearp
>
>
>_______________________________________________
>Bug-textutils mailing list
>[email protected]
>http://mail.gnu.org/mailman/listinfo/bug-textutils
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.