From af137@torfree.net Mon Oct 7 20:49:11 1996 Newsgroups: comp.editors Path: fu-berlin.de!news.nacamar.de!news-feed.inet.tele.dk!arclight.uoregon.edu!news-peer.gsl.net!news.gsl.net!www.nntp.primenet.com!nntp.primenet.com!nntp.uio.no!news2.interlog.com!news1.io.org!torfree!af137 From: af137@torfree.net (Al Aab) Subject: sed, capitalize words. loopy script Message-ID: Organization: Toronto Free-Net X-Newsreader: TIN [version 1.2 PL2] Date: Mon, 7 Oct 1996 18:07:08 GMT Lines: 27 weeks ago i posted a less general script. the old version insisted on mere blanks as word separators. the new version is relaxing that separator to include any nonalphanumerics. --------------------------------------------------------------------------- #5sep96. al aab. sed script to cap word initials. method 1 s/^/ / :loop h s/.*[^a-zA-Z0-9]\([a-z]\).*/\1/ /../{s/^[^a-zA-Z0-9]\(.*\)/\1/;b;} y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/ G s/\(.\)\n\(.*[^a-zA-Z0-9]\)[a-z]/\2\1/ tloop --------------------------------------------------------------------------- JOIN SEDERS AN INFORMAL SED MAILING LIST EMAIL ME --------------------------------------------------------------------------- -- =-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- al aab, seders moderator sed u soon it is not zat we do not see the s o l u t i o n -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+