[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: " 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 eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org