[Techtalk] script to change uppercase to title case in OFX/QFX
Miriam English
mim at miriam-english.org
Wed Nov 30 01:49:12 UTC 2011
Gah! I'm gonna be late for my appointment! Just noticed it gets tripped
up on some words. Fix that by moving the fist space match outside the
letter translating part:
sed 's/\( *\)\( *[A-Z]* *\)/\1\L\u\2/g'
Sorry about that.
Miriam English wrote:
> Oops! It stuffs up your tags, but you can fix that by translating them
> back again:
> sed 's/\(<[^>]*>\)/\U\1/g'
>
> like this:
> cat carlaS-example | sed 's/\( *[A-Z]* *\)/\L\u\1/g' | sed
> 's/\(<[^>]*>\)/\U\1/g'
>
> Cheers,
>
> - Miriam
>
--
If you don't have any failures then you're not trying hard enough.
- Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
-----
Website: http://miriam-english.org
Blogs: http://miriam-e.dreamwidth.org
http://miriam-e.livejournal.com
More information about the Techtalk
mailing list