From abarfoot@eng.auburn.edu Tue Oct 8 22:27:14 1996 Path: fu-berlin.de!news.nacamar.de!www.nntp.primenet.com!nntp.primenet.com!cam-news-hub1.bbnplanet.com!nntp-hub2.barrnet.net!cpk-news-hub1.bbnplanet.com!cpk-news-feed4.bbnplanet.com!news.fsu.edu!ultranews.duc.auburn.edu!usenet From: abarfoot@eng.auburn.edu (Andy Barfoot) Newsgroups: comp.editors,comp.unix.programmer,comp.unix.shell Subject: Re: sed, capitalize words. loopless script Date: 8 Oct 1996 18:43:36 GMT Organization: Auburn University College of Engineering Lines: 24 Distribution: inet Message-ID: <53e7co$9of@ultranews.duc.auburn.edu> References: Reply-To: abarfoot@eng.auburn.edu NNTP-Posting-Host: independence.eng.auburn.edu Xref: fu-berlin.de comp.editors:21021 comp.unix.programmer:50123 comp.unix.shell:42153 In article , af137@torfree.net (Al Aab) writes: >the following sed script was tested with msdos sed15, a more friendly/ >extended sed. >---------------------------------------------------------------------- ># capitalize the initial letter of every word ># al aab, toronto, 5 october 1996 >s/^/ / >s/\([^a-zA-Z]\)a/\1A/g >s/\([^a-zA-Z]\)b/\1B/g ... >s/\([^a-zA-Z]\)y/\1Y/g >s/\([^a-zA-Z]\)z/\1Z/g >s/^ // perl is even friendlier. :) s/\b(\w)/\u$1/g ^ ^ ^_up ^ ^_word character ^_word boundary