Date: Sun, 26 Mar 2000 14:07:11 -0800 From: Doug Barton <Doug@gorean.org> To: Greg Pavelcak <gpav@som.umass.edu> Cc: freebsd-questions@FreeBSD.org Subject: Re: A "title case" script Message-ID: <38DE8A0F.8CD9EF36@gorean.org> 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.
>
> I know about awk's toupper() and tolower(), but I haven't gotten
> it to work right yet.
Does it have to be awk? Assuming that what you want is the first letter
capitalized, you can just do,
$string = ucfirst lc $string;
Good luck,
Doug
--
"So, the cows were part of a dream that dreamed itself into
existence? Is that possible?" asked the student incredulously.
The master simply replied, "Mu."
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?38DE8A0F.8CD9EF36>
