tr -dc
tr -d
大小写替换
echo abc|tr '[a-z]' '[A-Z]'
str="This is a Bash Shell script."
newstr=`tr '[A-Z]' '[a-z]' <<<"$str"`
tr -dc
tr -d
大小写替换
echo abc|tr '[a-z]' '[A-Z]'
str="This is a Bash Shell script."
newstr=`tr '[A-Z]' '[a-z]' <<<"$str"`
转载于:https://www.cnblogs.com/hanxing/p/4240217.html