APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

case insensitive ls lc directory listing


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



Newsgroups: comp.unix.sco.misc
From: Bill Campbell <bill@celestial.com>
Subject: Re: beautiful moon
Date: Wed, 4 Oct 2000 03:58:58 GMT
Message-ID: <20001003205858.B22657@kstarr.celestial.com> 
References: <20001003232310.K3723@jpradley.jpr.com> 
Mail-Followup-To: "ScoMisc [c.u.s.m]" <scomsc@xenitec.on.ca>

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.

On Wed, Oct 04, 2000 at 03:23:10AM +0000, Jean-Pierre Radley wrote:
>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
--
INTERNET:   bill@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



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> case insensitive ls lc directory listing ––>Re: beautifulmoon



Increase ad revenue 50-250% with Ezoic

Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





You learn about life by the accidents you have, over and over again, and your father is always in your head when that stuff happens. (Kurt Vonnegut)





This post tagged: