String operation like length of string, extract substring and find location of any character using Linux shell script in Ubuntu

echo ___Len of String__
echo Enter Your Name
read "str"
len=`echo $str | awk '{print length}'`
echo length is $len
echo Enter Character
read find
set -- $find
loc=${str%%$find*}
echo location is ${#loc}