[Top][All Lists]

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

bug#8032: Suggestion in re. error reports from 'comm'

From: Eric Blake
Subject: bug#8032: Suggestion in re. error reports from 'comm'
Date: Tue, 15 Feb 2011 08:42:50 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

[let's keep the list in the loop]

On 02/14/2011 07:51 PM, Paul E Condon wrote:
>> Thanks for the report.  Yes, per POSIX, the following list of rules
>> should apply to ALL utilities that perform sorting (first one that
>> applies wins):
>> If LC_ALL is non-empty, honor that
>> If LC_COLLATE is non-empty, honor that
>> If LANG is non-empty, honor that
>> Use an implementation-defined default.
> My facilities for testing these issue are limited. Thanks for
> this information. 
> My script is not yet well written. I had always supposed that the
> actual existence of scripts that are not well written is the
> justification for spending time writing useful error messages and
> even the justification for the existence of syserr
> I'm not surprised that my second suggestion is not OK. My first
> suggestion was to modify the error message that is emitted by 'comm'.
> Now that I better understand that there are four possible classes of
> collating sequences involved, I can refine my suggestion: Change the
> text of the error message about a file not being in sort order to
> append "according to collation rule: <and place here the rule>" For
> the fourth case (implementation dependent). it would be nice to invent
> a wording that is shorter than 'implementation dependent'.
> This could be useful to people debugging scripts on many platforms.
> I can imagine a programmer getting major help from a message
> "file 2 is not in sort order according to LC_COLLATE=C"

Ah, so your suggestion is to make the error message smarter, by adding a
clause which says which environment variable or system default
determined the current collation order, as well as which locale is
currently in use.  That actually sounds like a nice idea!  Would you
care to help write the code?

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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