Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

beautiful moon

0 views
Skip to first unread message

Jean-Pierre Radley

unread,
Oct 3, 2000, 11:23:10 PM10/3/00
to ScoMisc [c.u.s.m]
In honor of the beautiful first quarter moon this evening, here's a
free tip o' my hat:

Instead of this listing when you list a directory:

AWF.IP
TFX.IP
appl
save.tar
ud

you can have a case-insensitive sort, instead of strict ASCII order:

appl
AWF.IP
save.tar
TFX.IP
ud

The first is produced under the default language setting of C_C.C,
while the latter comes from setting LANG=english_us.8859 (or more
conservatively, LC_COLLATE=english_us.8859) in your environment.

--
JP

Bill Campbell

unread,
Oct 3, 2000, 11:58:58 PM10/3/00
to ScoMisc [c.u.s.m]
You can also get a case insensitive sort by using standard sort options
like ``sort -fd''. The -f says lower case characters into the equivalent
upper case, and the -d says Sort in `phone directory' order: ignore all
characters except letters, digits, and blanks.

Using any LANG setting other ``C'' can cause some very strange results when
one is doing system administration things where I expect a straight ascii
sort.

The first time I ran into this was when I was building gawk on a UnixWare
system when it failed the tests because sorts weren't producing the
expected results.

--
Bill
--
INTERNET: bi...@Celestial.COM Bill Campbell; Celestial Software LLC
UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

It is necessary for the welfare of society that genius should be
privileged to utter sedition, to blaspheme, to outrage good taste, to
corrupt the youthful mind, and generally to scandalize one's uncles.
-- George Bernard Shaw

0 new messages