… …
${#str}
]# st='abc' ]# echo ${#st} 3
expr index "${str}" "*"
# *表示关键字符
]# st='abc' ]# expr index "${st}" "b" 2
${str/需要被替换的字符/替换的字符}
]# st='abc' ]# sp=${st/a/d} ]# echo ${sp} dbc
${str:begin:len}
]# st='abc' ]# echo ${st::3} abc ]# echo ${st:0:3} abc ]# echo ${st:1:3} bc
… …