Re: Negative array subscript with unset

2011-03-12 Thread Chet Ramey
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 probl

Re: Negative array subscript with unset

2011-03-12 Thread Dennis Williamson
On Sat, Mar 12, 2011 at 6: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 > > > -- >   Chris F.A. Johnson, >