Re: Capitalize a variable in a shell script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Try this...

variable2=`echo $variable1 | tr [a-z] [A-Z]`

Cheers,
Frank

Diego Alencar Alves de Lima wrote:
How can I capitalize an existing variable in a shell script? Currently $variable is www.domain.com, and I need to create a $variable1 that contains WWW.DOMAIN.COM (I am currently using bash as shell)

Thanks a lot


--
Best if consumed promptly upon delivery or take out... :)

begin:vcard
fn:Franklin Chua
n:Chua;Franklin
org:NEC Telecom Software Philippines, Inc.
adr:;;2nd Flr. Bonifacio Technology Center;Taguig, Metro Manila;;;Philippines
email;internet:fchua@xxxxxxxxxxxxxx
title:Software Design Engineer II
tel;work:+632 818-0913
tel;fax:+632 818-0927
note;quoted-printable:NECNET: 800 63 (91) 5411=0D=0A=
	NECFAX: 800 63 (91) 5209
x-mozilla-html:TRUE
version:2.1
end:vcard


[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux