On Tue, 2003-07-15 at 21:06, Eric Chevalier wrote:

> >Ok, I'm tired of banging my head against this one.  I know there must be
> >a simple perl, sed or tr solution, but I can't seem to find it.  I'm
> >cleaning up some extracted data and the one annoying thing I have left
> >is a single quote followed by a capital letter, which I want to change
> >to lowercase like so:
> >
> >Can'T -->  Can't
> >Santa'S --> Santa's
> >
> >and so on.


> Maybe I'm missing something obvious, but why not a simple tr command:
> 
>      tr [A-Z] [a-z] <infile >outfile
> 
> It seems to work just fine for me; caps are replaced by their lower-case 
> equivalent, and everything else is left untouched.

Because I only want the conversion to lowercase if the letter is
preceded by a single quote.  tr would replace *all* upper-case
characters, so:

Can'T --> can't

> Eric

Nice name.  ;-)

-Eric

-- 

Eric Sisler <[EMAIL PROTECTED]>
Library Applications Specialist
Westminster Public Library
Westminster, CO USA

Linux - Don't fear the Penguin.
Want to know what we use Linux for?
Visit http://gromit.westminster.lib.co.us/linux



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to