We can use another form of variable expansion to select a specific substring, based on a specific character offset and length. Try typing in the following lines under bash.
可以根据特定字符偏移和长度,使用另一种形式的变量扩展,来选择特定子字符串。
2
For example, the "! "character is the history expansioncharacter, which bash normally replaces with a previously-typed command.
例如,“ ! ”字符是历史扩展字符,bash通常将其替换为前面输入的命令。
3
You will notice that on a US keyboard, shift-4 is "$", which is the bash variable expansioncharacter.