[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with sort
From: |
Bernd Klein |
Subject: |
Problem with sort |
Date: |
Mon, 28 Feb 2005 17:28:17 +0100 |
User-agent: |
KMail/1.7.1 |
Hi,
I think I found a bug in "sort".
Maybe this list is not the right place to report it, but I don't know where
else to do it.
If I take the following file:
sdf 4 trc
xya 3 trt
bal 1 trt
blabla 0.5 abcd
xyz 1 ggg
xyz2 0.4 df
xyz3 0.1 xyz5
xyz4 0.002 bal
xyz5 0.1 xyz2
"sort +1 -2 example.txt" gives me the following result:
xyz4 0.002 bal
xyz3 0.1 xyz5
xyz5 0.1 xyz2
xyz2 0.4 df
blabla 0.5 abcd
bal 1 trt
xyz 1 ggg
xya 3 trt
sdf 4 trc
which is what I expect to happen, but if I use "sort -g +1 -2 example.txt"
(-g according to man page: compare according to general numerical value)
I get the confusing result:
blabla 0.5 abcd
xyz2 0.4 df
xyz3 0.1 xyz5
xyz4 0.002 bal
xyz5 0.1 xyz2
bal 1 trt
xyz 1 ggg
xya 3 trt
sdf 4 trc
Most probably I am messing up some things, but I don't know what.
I am using this version with SuSE 9.2:
sort (coreutils) 5.2.1
If I do the same thing in a cygwin shell, everything works the way, I expect
it to work, i.e. I get for "-g" the sorted output as in
"sort +1 -2 example.txt"
And I get a numerical ordering, if I use exponential expressions like e.g.
7e-7
Is there somebody, who knows about this problem?
Best wishes,
Bernd
--
Bernd C. Klein |
Pomeziastrasse 9, 78224 Singen, Germany
URL: http://www.bklein.de, e-mail: bernd@bklein.de
Phone: 07731/798180
Fax: 01805/3331602477
- Problem with sort,
Bernd Klein <=