|
大家好,这里是我实验的代码小弟初学,- stringZ=abcABC123ABCabc
- echo "Scrip out shortest match between 'a' and 'C'"
- echo "\${stringZ$1 a*C}:"
- echo ${stringZ`$1` (a*C)}
- echo "Strip out longest matech between 'a' and 'C'"
- echo "\${stringZ$1a*C}:"
- echo ${stringZ$1(a*C)}
复制代码 如何实现在string里获取positional parameters value?上边那样写会报错,bad substitution
请问,./substring %
达到这样的效果
[code ]
${string% a*C}
[/code] |
|