Problem duplicated on AMD64/SuSE9.1 GNU Linux and Apple G5/MacOS
10.3.6. Both ship wit the same version of bash as given above.
"man bash" says in the Parameter Expansion section under Substring
Expansion (${parameter:offset:length}) that "[i]f offset evaluates
to a number less than zero, the value is used as an offset from the
end of the value of parameter."
However, experience suggests otherwise:
$ xyz='abcdefghijkl'
$ echo ${xyz}
abcdefghijkl
$ echo ${xyz:3} # Positive offset - OK
defghijkl
$ echo ${xyz:-3} # Negative offset - Not OK
abcdefghijkl
I don't know whether this is a bug in the manual page or the bash
program. Or in my understanding of the manual page.