bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Negative array subscript with unset


From: Chris F.A. Johnson
Subject: Negative array subscript with unset
Date: Sat, 12 Mar 2011 19:21:26 -0500 (EST)
User-agent: Alpine 2.00 (LMD 1167 2008-08-23)


  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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]