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

case insensitive ls lc directory listing


© December 2004 (various authors)

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: https://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


Inexpensive and informative Apple related e-books:

Digital Sharing Crash Course

Take control of Apple TV, Second Edition

Photos for Mac: A Take Control Crash Course

Photos: A Take Control Crash Course

Take Control of High Sierra





Printer Friendly Version

Have you tried Searching this site?

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


Printer Friendly Version





I was taught that the human brain was the crowning glory of evolution so far, but I think it’s a very poor scheme for survival (Kurt Vonnegut).




Linux posts

Troubleshooting posts


This post tagged:

SCO_OSR5



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode





SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)
www.SCOsales.com