On Sat, Mar 12, 2011 at 6:21 PM, Chris F.A. Johnson
<ch...@cfajohnson.com> 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, <http://cfajohnson.com/>
>   Author:
>   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
>   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
>
>

Assignments to negative indices don't work either. (Bash 4.2)

-- 
Visit serverfault.com to get your system administration questions answered.

Reply via email to