Re: sort -n

Andrew D Jewell <[email protected]>
Newsgroups gmane.comp.gnu.textutils.bugs
Message-ID <a05111733b92fc7a73433@[24.29.2.159]>
   -n, --numeric-sort          compare according to string numerical value
   -g, --general-numeric-sort  compare according to general numerical value

-n is fast and for integers only
-g is slower, and sorts as by strtod, which is what you want.

adj

At 2:08 PM +0000 6/14/02, Apua Paquola wrote:
>I don't know if it is a bug or a request for a new feature but sort -n
>doesn't take into account floating foint values in scientific
>notation. (See sort output below).
>
>Thanks,
>Apu?
>
>$ sort (GNU textutils) 2.0
>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.
>
>
>$ sort -n < file
>8.02503237684515
>8.14014069979627
>8.18363723886096e-05
>8.18363723886096e-05
>8.31689391420718
>8.76345959600836
>10.3756092554339
>
>--
>Apu? Paquola
>Bioinformatics Group
>Biochemistry Department, University of S?o Paulo
>http://bioinfo.iq.usp.br
>
>_______________________________________________
>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.