[Techtalk] script to change uppercase to title case in OFX/QFX
Carla Schroder
carla at bratgrrl.com
Wed Nov 30 05:49:01 UTC 2011
sed and awk are so frikken fun. When they work :) I'll give this a try,
thanks!
Carla
> 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
More information about the Techtalk
mailing list