[Top][All Lists]

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

Re: strange

From: Bob Proulx
Subject: Re: strange
Date: Thu, 22 Aug 2002 21:22:06 -0600
User-agent: Mutt/1.4i

Paul Miller <address@hidden> [2002-08-22 11:15:50 -0400]:
> I hope this is a dumb question...  is there an evironment
> var that sets '-d' for me or something?

Yes.  There is an environment variable call LANG which given your
behavior is almost certainly set to en_US.  And I bet I could guess
the vendor.  Use the 'locale' command to dump your current locale

You have found a common ailment.  As you can see the spaces and
punctuation are ignored and case is ignored when LANG is set to en_US.
Your vendor set LANG for you to en_US because they think you like it
that way.  If you disagree then you might consider filing a bug report
with them.  GNU sort does not set this for you.

Here is a standard reply. 


Please check out the FAQ section on sort.


This is due to the fact that you or your vendor have set environment
variables that direct the program to use locale specific sorting
tables which do not sort as you expect.  You or your vendor have
probably set environment variables like LANG, LC_ALL, or LANG to
en_US.  Use the 'locale' program to display your current settings.

Unset them, and then set LC_ALL to POSIX.

  # If you use bash or some other Bourne-based shell,
  export LC_ALL=POSIX

  # If you use a C-shell,
  setenv LC_ALL POSIX

and it will then work the way you expect because it will use a
different set of tables.

See the standards documentation for more information on the locale
variables with regards to sort.


reply via email to

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