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)