Re: Upper <->Lower in shell script

1999-12-17 Thread Mike Smith

> This message was sent from Geocrawler.com by "Alex" <[EMAIL PROTECTED]>
> Be sure to reply to that address.
> 
> Hello,
> 
> 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?

tr A-Z a-z

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  [EMAIL PROTECTED]
\\ and he'll hate you for a lifetime. \\  [EMAIL PROTECTED]




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Upper <->Lower in shell script

1999-12-17 Thread Chris Costello

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?

   Oops.  That should be typeset -l.

$ typeset -l var
$ var=ABC
$ echo $var
abc

-- 
|Chris Costello <[EMAIL PROTECTED]>
|Random access is the optimum of the mass storages.
`--


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Upper <->Lower in shell script

1999-12-17 Thread Chris Costello

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 <[EMAIL PROTECTED]>
|Beware of programmers who carry screwdrivers.  - Leonard Brandwein
`--


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Upper <->Lower in shell script

1999-12-17 Thread Dan Nelson

In the last episode (Dec 17), Alex said:
> 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?

#!/bin/sh
var=MixedCase
lvar=`echo $var | tr A-Z a-z`
echo $lvar

#!/usr/local/bin/zsh
var=MixedCase
lvar=${var:l}
echo $lvar

-- 
Dan Nelson
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Upper <->Lower in shell script

1999-12-17 Thread Alex

This message was sent from Geocrawler.com by "Alex" <[EMAIL PROTECTED]>
Be sure to reply to that address.

Hello,

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?

Thank you
Alex

Geocrawler.com - The Knowledge Archive


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message