- 论坛徽章:
- 33
|
${parameter^pattern}
${parameter^^pattern}
${parameter,pattern}
${parameter,,pattern}
Case modification. This expansion modifies the case of alphabetic characters in parameter. The pattern is expanded to produce a pattern just as in pathname
expansion. The ^ operator converts lowercase letters matching pattern to uppercase; the , operator converts matching uppercase letters to lowercase. The ^^ and
,, expansions convert each matched character in the expanded value; the ^ and , expansions match and convert only the first character in the expanded value.. If
pattern is omitted, it is treated like a ?, which matches every character. If parameter is @ or *, the case modification 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 case modification operation is applied
to each member of the array in turn, and the expansion is the resultant list.
|
首先要搞清楚什么是pathname expansion,这一点很关键。
其次要分清^和^^,前者是first,后者是each
你先仔细想想,实在不明白再问。 |
|