bug-textutils
[Top][All Lists]
Advanced

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

Re: Possible bug in `sort'


From: Bob Proulx
Subject: Re: Possible bug in `sort'
Date: Sun, 13 Jun 2004 13:01:44 -0600
User-agent: Mutt/1.3.28i

Thanks for the report.  It is most appreciated.  However it matches a
very common problem signature which is not usually a bug in sort.  (Or
ls either.)

David Klein wrote:
> tmp-> sort --version
> sort (GNU textutils) 2.0e

Ew, that is very old.  But it is not the age of that code so much as
that there have many, many bugs reported by people like yourself and
upgrades and fixes in the intervening years since that release.
Please consider upgrading.

Latest stable release:
    ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.2.1.tar.gz   (6.3MB)
    ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.2.1.tar.bz2   (4.1MB)
    (coreutils is the union of fileutils, textutils, and sh-utils)

> I noticed that sort sometimes sorts '-' before '1' and sometimes
> after. Here is an example, together with relevant version numbers.

It sorts according to your 'locale'.  What is the output of the locale
program on your system?  Some locales are dictionary sort order where
case is folded and punctuation is ignored.

  locale

This is an FAQ.  Here is a semi-standard reply:

Try this and then try your test again.

  unset LANG
  export LC_ALL=POSIX

Please read this faq, look for "Sort does not sort" for the entry in
question.

  http://www.gnu.org/software/coreutils/faq/

See your system and other standards documentation for how it reacts in
the presence of locales.

  http://www.unix-systems.org/single_unix_specification_v2/xcu/sort.html

Hope that helps,
Bob




reply via email to

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