From owner-freebsd-questions Sun Mar 26 12: 2:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 3040737BA2E for ; Sun, 26 Mar 2000 12:02:52 -0800 (PST) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.12 #1) id 12ZHwo-000AsR-00; Sun, 26 Mar 2000 19:39:38 +0100 Received: (from ben) by strontium.scientia.demon.co.uk (Exim 3.12 #7) id 12ZHwo-000EDV-00; Sun, 26 Mar 2000 19:39:38 +0100 Date: Sun, 26 Mar 2000 19:39:38 +0100 From: Ben Smithurst To: Greg Pavelcak Cc: freebsd-questions@FreeBSD.org Subject: Re: A "title case" script Message-ID: <20000326193938.X86036@strontium.scientia.demon.co.uk> References: <20000326125654.A77405@oitunix.oit.umass.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000326125654.A77405@oitunix.oit.umass.edu> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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