bug-coreutils
[Top][All Lists]
Advanced

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

Re: sort inconsistencies


From: Padraig Brady
Subject: Re: sort inconsistencies
Date: Mon Nov 4 11:52:35 2002
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827

address@hidden wrote:
Padraig Brady <address@hidden> [2002-10-14 14:43:21 +0100]:

$ sort --version
sort (textutils) 2.0.21

$ echo $LANG
en_US.iso885915

That LANG setting will select "dictionary" sort order where case is
folded and punctuation is ignored.

$ cat sort
Current working directory
-> /bin
---> /sbin
--> /usr/bin

$ sort -k1,1
-> /bin
--> /usr/bin
---> /sbin
Current working directory

That does seem odd.  It is in reverse order.  I get the order in the
other direction.

$ LC_ALL=C sort -k1,1
---> /sbin
--> /usr/bin
-> /bin
Current working directory

$ sort -k1,1 -t:
-> /bin
Current working directory
---> /sbin
--> /usr/bin

I can't reproduce that.  I get this:

  ---> /sbin
  --> /usr/bin
  -> /bin
  Current working directory

$ LC_ALL=C sort -k1,1 -t: sort
---> /sbin
--> /usr/bin
-> /bin
Current working directory

$ sort -k1
-> /bin
Current working directory
---> /sbin
--> /usr/bin


$ LC_ALL=C sort -k1 sort
---> /sbin
--> /usr/bin
-> /bin
Current working directory

What is the output of 'locale'?  Does it show other settings?

  locale

All en_US...

If you set LC_ALL to C or POSIX and try the experiment again what do
you get?

  export LC_ALL=POSIX

In summary all is consistent with POSIX or C
System is standard RH7.3 (glibc 2.2.5).

Pádraig.





reply via email to

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