Re: [PATCH dash] [BUILTIN] ensure LC_COLLATE is not overriden

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

 



On 08/05/2014 11:19 AM, Chema Gonzalez wrote:
> On Tue, Aug 5, 2014 at 10:14 AM, Eric Blake <eblake@xxxxxxxxxx> wrote:
>> On 08/05/2014 11:12 AM, Chema Gonzalez wrote:
>>>> Setting LC_ALL= to the empty string risks implementation-defined
>>>> behavior.  Also, LC_ALL overrides LANG and LC_COLLATE.  It should be
>>>> sufficient to merely do:
>>>>
>>>>         }}' $temp | LC_ALL=C sort -k 1,1 | tee $temp2 | awk '{
>>>
>>> Maybe:
>>>     }}' $temp | LC_ALL=C LANG=C sort -k 1,1 | tee $temp2 | awk '{
>>
>> No need to specify LANG=C when LC_ALL is set.  I stand by my shorter line.
> I'd prefer to see if any FreeBSD user can confirm whether LC_ALL
> overrides LANG (as in Linux) or the other way around. The docs seems
> to suggest to use LANG instead of LC_ALL there.

Bug in the docs, then, as POSIX is quite clear that LC_ALL overrides
LC_* overrides LANG.  If FreeBSD ever got it backwards, even
temporarily, from what POSIX requires, it would be a lot more obvious.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux