On 3/12/11 7:21 PM, Chris F.A. Johnson wrote:
> 
>   I all versions I have tried, unsetting an array element using a
>   negative index fails:
> 
> $ array=( q w e r t y )
> $ unset 'array[-1]'
> bash: [-1]: bad array subscript

Negative subscripts only work with ${parameter[subscript]}.  The problem
is that I put the text in the manual page describing their use in the
wrong place.  It should have gone in the paragraph describing array
references.

Negative subscripts will work in more contexts in the next version of bash.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to