Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Dec 1999 10:27:35 -0600
From:      Chris Costello <chris@calldei.com>
To:        Alex <al.feldman@sangoma.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Upper <->Lower in shell script
Message-ID:  <19991217102735.E523@holly.calldei.com>
In-Reply-To: <199912171619.IAA26603@www.geocrawler.com>
References:  <199912171619.IAA26603@www.geocrawler.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 17, 1999, Alex wrote:
> I need in my shell script change upper case to 
> lower case for characters. Cureently , I call c 
> programm from script which do it.
> Is anybody did this inside script?

   Shells such as ksh (both PDKSH and AT&T KSH, available in
ports, support this) and bash have a typeset command.  To convert
something to all upper-case is surprisingly easy:

typeset -u variable

   Example:

$ typeset -u f
$ f=abc
$ echo $f
ABC

-- 
|Chris Costello <chris@calldei.com>
|Beware of programmers who carry screwdrivers.  - Leonard Brandwein
`------------------------------------------------------------------


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




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