shell获取字符串长度
echo ${#str}
echo ${str} | awk '{print length($0)}'
echo $str | awk -F "" '{print NF}'
echo ${str} |wc -L
echo -n $str |wc -c
expr length ${str}
expr $str : ".*"
echo ${#str}
echo ${str} | awk '{print length($0)}'
echo $str | awk -F "" '{print NF}'
echo ${str} |wc -L
echo -n $str |wc -c
expr length ${str}
expr $str : ".*"