${a/23/BB} # 将23替换成BB
control(){local id=${1/card/}echo $id}control card10 输出10
bash ${}
原文:http://www.cnblogs.com/fastwave2004/p/4150011.html