coreutils
[Top][All Lists]
Advanced

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

Re: Sort differently on mac with some LC_ALL


From: Pádraig Brady
Subject: Re: Sort differently on mac with some LC_ALL
Date: Sun, 11 Dec 2016 20:44:33 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 11/12/16 05:13, Peng Yu wrote:
> On mac, all the following LC_ALL result in the same results of sort.
> 
> 
> LC_ALL=en_US.UTF-8 sort <<< $'a\nb\nA\nB'
> A
> B
> a
> b
> LC_ALL=en_US sort <<< $'a\nb\nA\nB'
> A
> B
> a
> b
> LC_ALL=C sort <<< $'a\nb\nA\nB'
> A
> B
> a
> b
> 
> But they are not all the same on linux. Do anybody know a LC_ALL on
> mac that would make sort sort differently? Thanks.
> 
> LC_ALL=en_US.UTF-8 sort <<< $'a\nb\nA\nB'
> a
> A
> b
> B
> LC_ALL=en_US sort <<< $'a\nb\nA\nB'
> A
> B
> a
> b

I get en_US = en_US.UTF-8 on Linux as expected

> LC_ALL=C sort <<< $'a\nb\nA\nB'
> A
> B
> a
> b
> 

As to your question of getting a case insensitive collating order on osx, see:
http://apple.stackexchange.com/a/157906/62853

cheers,
Pádraig



reply via email to

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