标签: bash
子串扩展的工作方式与预期不符。
a='123?' echo $a #outputs '123?' as expected echo ${a:3:1} #outputs '=' not as expected echo ${a:2:2} #outputs '3?' as expected echo "${a:3:1}" #outputs '?' as expected
我无法理解,请帮助我。