Tuesday, September 6, 2011

Converting lowercase to uppercase and uppercase to lowercase in Shell


Simple use  truncate  in Shell

ddd="HELLO"
For converting uppercase to lowercase use  tr '[A-Z]' '[a-z]'
echo $ddd | tr '[A-Z]' '[a-z]'    will convert  uppercase into lowercase

For converting lowercase to uppercase use tr '[a-z]' '[A-Z]'
echo $ddd | tr '[a-z]' '[A-Z]'