shell变量的删除与替换

在读鸟哥的私房菜的时候,我学习到了shell变量的删除与替换方法,删除方法之前接触过,而替换方法则是之前没有接触过的 我们用一些例子来说明一下上述的用法 astr='good_good' echo ${astr#*_} good echo ${astr#good} _good echo ${astr%good} good_ echo ${astr/good/bad} bad_good echo
相关文章
相关标签/搜索