>"Note that a negative offset must be separated from the [non-following] >colon by at least one space to avoid being confused with the ':-' >expansion,' since a negative offset can exist immediately beside a >subsequent colon.
>Wiley Note, incidentally, that it is not strictly true that a negative offset has to be preceded by a space. A zero will work as well. And I think that is clearer. I.e., instead of: # Print the last 2 characters of $HOME $ echo ${HOME: -2} You can do: $ echo ${HOME:0-2} Or even: $ echo ${HOME:7-9} ================================================================================= Please do not send me replies to my posts on the list. I always read the replies via the web archive, so CC'ing to me is unnecessary. Note that they always end up in my Spam file anyway, so it is annoying to have to periodically clean that out.