kiranchandbv
asked on
Changing case of a variable
How can I change case of first letter of a variable in shell programming?
#!/bin/sh
$name = "hello"
$name = toTitleCase($name);
echo $name
Is there anything like titleCase or soemthing that will change case of first letter to upper case.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I could make it work with small change in the index value in substr.
Thanks again.
name="hello"
echo $name
name=`echo $name |awk '{print toupper(substr($0,1,1))sub
echo $name