bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sort


From: David Gregg
Subject: sort
Date: Mon, 26 Aug 2002 14:23:39 +0100 (IST)

Hi There,

I'm using:
sort (textutils) 2.0.21
Written by Mike Haertel and Paul Eggert.

I have a file called "bob" consisting of the lines:
@_0<_0=_and_;s / super3772 = @ 0< 0= and ;s
0<_0=_and_;s / super7840 = 0< 0= and ;s
0<_0=_and / super14257 = 0< 0= and
@_0<_0=_and / super6513 = @ 0< 0= and

If I type "sort bob" then I get the following output:
@_0<_0=_and_;s / super3772 = @ 0< 0= and ;s
0<_0=_and_;s / super7840 = 0< 0= and ;s
0<_0=_and / super14257 = 0< 0= and
@_0<_0=_and / super6513 = @ 0< 0= and

In other words, sort thinks that this is a correct sorting of the file.
It is not. The correct output should be:
0<_0=_and / super14257 = 0< 0= and
0<_0=_and_;s / super7840 = 0< 0= and ;s
@_0<_0=_and / super6513 = @ 0< 0= and
@_0<_0=_and_;s / super3772 = @ 0< 0= and ;s

If I had typed "sort -d bob" (-d specifies to ignore all characters except
alphanumeric ones) then this would be the correct output.

I tried this out on another machine which has "sort (GNU textutils) 1.22"
and it behaves correctly. The sort program on our Digital Unix box also
works correctly.

The awkward thing about this bug is that while it is possible to turn on
the -d option on other versions of the sort program if you want this
behaviour, on "sort (textutils) 2.0.21" there is no way to turn off this
behaviour.

Thanks,

David.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]