On Wed, Apr 15, 2009 at 9:31 PM, Rich Shepard <[email protected]> wrote: > On Wed, 15 Apr 2009, Hal Pomeranz wrote: > >> perl -pe 'tr/A-Z/a-z/; s/(\S+)/\u$1/g;' <filename> > > Ooh! How slick that is. I don't know perl so I thank you very much for an > exceptionally fine and useful tool. The one addition to make on the command > line is to redirect the output to another file.
My sed-fu was deficient I guess (or my sed was) so I fell back to perl: If you want word-case perl -pe 's/ \b (\w) ([^\s]+) \b /\1\L\2/gx' # ONE COMPANY -> One Company (rather than One company) Cheers, -Nate _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
