Bash 脚本中的运算符 '::' 是什么?

What is Operator '::' in Bash Script?

我需要帮助来翻译这行来自 bash 脚本

VARIABLE="${VARIABLE:: -3}"

这是来自 linux 的脚本,谢谢

就是做一个子串的起始和长度(+)或者从结束(-)的位置

echo ${foo}
abcdefg
# cut off the first and last character
echo ${foo:1:-1}
bcdef
# cut off the last 3 characters. start is empty
echo ${foo::-3}
abcd