On Mon, Jun 12, 2000 at 03:57:12PM -0500, Bret Hughes wrote:
> SoloCDM wrote:
>
> > What commands convert casing to upper, lower, and proper (proper: as
> > in Virginia)?
> >
>
> tr will translate from on to the other. take a look at man tr. Also a
> thread awhile back that mentioned this. some thing like cat file |tr
> [a-z] [A-Z]>newfile will probably come close but this is a guess.
>
> For the Title Case Situation you will probably have to get tricky.
>
Perl's ucfirst() function can do this, e.g.,
$ echo virginia | perl -ne 'print $_, ucfirst';
virginia
Virginia
$
$ perldoc -f ucfirst
=item ucfirst EXPR
=item ucfirst
Returns the value of EXPR with the first character uppercased. This is
the internal function implementing the C<\u> escape in double-quoted strings.
Respects current LC_CTYPE locale if C<use locale> in force. See L<perllocale>.
If EXPR is omitted, uses C<$_>.
--
Ken Irving
Trident Software
[EMAIL PROTECTED]
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.