bug-coreutils
[Top][All Lists]
Advanced

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

Re: ls broken


From: Bob Proulx
Subject: Re: ls broken
Date: Sat, 15 May 2004 18:18:16 -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 ls.  (Or
sort either.)

Brad Huntting wrote:
> It would appear that ls(1) sorts alphabetically (case insensitive).

No.  It sorts according to your 'locale'.  What is the output of
the locale program on your system?  Did you change it recently?

  locale

> This is in contrast to every other version of *nix which sorts by
> straight character code (which is obviously case sensitive).  (In
> truth I dont know what EBCDIC based Unix machines would do).

What is the output of 'locale' on those systems?  Is it different?

> Obviously this must have been a deliberate feature, posibly an
> offering to appease the case insensitivity fanatics of bygone times.
> What's worse, there does not appear to be any (documented) way to
> correct this (by, for example, environment variables).

Actually it 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]