On Tuesday, 1. March 2005 00:05, you wrote: > Bernd Klein <[EMAIL PROTECTED]> writes: > > 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 > > You are probably using a locale that uses a comma as the decimal sign. > Thus the sort key for all lines where the number starts with "0." is 0, > while preserving the relative order of each of them. > > Andreas.
Andreas Thanks a bundle! The German locale is due to what looked like a bug! As soon as I had changed the dots into commas, everything worked the way I expected it. But it means on the other hand, that I can't sort international results (with "." instead of ",") in a German locale, execept with using sed or awk as a filter. Though this behaviour of sort makes sense, I hope that not too many people fall prey to it! Bernd _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
