[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in sort?
From: |
Henk M. Keller, AT Computing BV |
Subject: |
Bug in sort? |
Date: |
Wed, 10 Jan 2001 14:35:00 +0100 |
Sirs,
I can not explain the behavior of the command "sort" as demonstrated in the
following typescript:
======== Start of typescript
Script started on Wed Jan 10 12:52:48 2001
demo$ uname -a
Linux pantarhei.ATComputing.nl 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686
unknown
demo$ ls -l /bin/sort
-rwxr-xr-x 1 root root 27632 Feb 7 2000 /bin/sort
demo$ sort --version
sort (GNU textutils) 2.0a
Written by Mike Haertel.
Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
demo$ cat >demo-in
2
1
4
3
5
demo$ sort -n demo-in
5
1
2
3
4
demo$ exit
Script done on Wed Jan 10 12:53:27 2001
======== End of typescript
Numeric sorting seems to succeed only if *all* the numbers are preceeded by
whitespace (but this is just an impression).
Hardware: LeoDesign 300MHz Pentium II, 128MB
The sort command has *not* been recompiled, the version used is the one
supplied with Mandrake 7.2.
An older sort, "sort - GNU textutils 1.14" on a FreeBSD system, seems to
sort correctly.
Greetings from the Netherlands,
--
----- address@hidden ------- http://www.ATComputing.nl
Henk M. Keller - AT Computing, P.O. Box 1428, NL-6501BK Nijmegen
+31-24-3527252 (fax: 3527292) UNIX training and consultancy
Linux is a good UNIX, and we do UNIX training...
Please send mails and files in ASCII, HTML or Postscript; No MSWord!
- Bug in sort?,
Henk M. Keller, AT Computing BV <=