- 论坛徽章:
- 0
|
回复 #6 springwind426 的帖子
找到了,在bash手册里
parameter expansion的内容
http://www.gnu.org/software/bash/manual/bashref.html#SEC29
${parameter//pattern/string}
If pattern begins with `#', it must match at the beginning of the expanded value of parameter.
If pattern begins with `%', it must match at the end of the expanded value of parameter.
If string is null, matches of pattern are deleted and the / following pattern may be omitted.
If parameter is `@' or `*', the substitution operation is applied to each positional parameter in turn, and the expansion is the resultant list.
If parameter is an array variable subscripted with `@' or `*', the substitution operation is applied to each member of the array in turn, and the expansion is the resultant list |
|