Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Mar 2000 19:39:38 +0100
From:      Ben Smithurst <ben@scientia.demon.co.uk>
To:        Greg Pavelcak <gpav@som.umass.edu>
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: A "title case" script
Message-ID:  <20000326193938.X86036@strontium.scientia.demon.co.uk>
In-Reply-To: <20000326125654.A77405@oitunix.oit.umass.edu>
References:  <20000326125654.A77405@oitunix.oit.umass.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Greg Pavelcak wrote:

> When I get information from the University database, it's all
> caps. Usually we use this info for mass mailings, so we want
> proper capitalization. MSWord's "title case" feature gets it
> almost right. I was wondering if anyone has an awk or perl or
> something script that can do this job.

try filtering it though,

perl -pe 'tr/A-Z/a-z/; s/\b([a-z])/uc $1/eg'

that's hardly tested, but it seems to work. This may be too simple for
what you want, but it's a start.

-- 
Ben Smithurst / ben@scientia.demon.co.uk / PGP: 0x99392F7D


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000326193938.X86036>