LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Changing upper caseto lower case using Bash (https://www.linuxquestions.org/questions/linux-newbie-8/changing-upper-caseto-lower-case-using-bash-671008/)

basildon 09-19-2008 05:50 AM

Changing upper caseto lower case using Bash
 
Hi

I tried the following but with no success could anyone please advise what is wrong?

var=aBcDeFg
var=$var | tr "[:upper:]" "[:lower:]"
echo $var


Thanks

i92guboj 09-19-2008 06:53 AM

Code:

var=$(echo $var | tr "[:upper:]" "[:lower:]")


All times are GMT -5. The time now is 11:25 AM.