On 2008-09-24, [EMAIL PROTECTED] wrote: ... > Description: > When nullglob option is enable (shopt -s nullglob), unset of an array > does not work. > > Repeat-By: > my_array=(1 2 3 4 5 6) > echo "Array [EMAIL PROTECTED]" > shopt -u nullglob > # remove first entry > unset my_array[0] > echo "Array [EMAIL PROTECTED]" > shopt -s nullglob > # remove first entry > unset my_array[0]
There is no longer any my_array[0] to unset. Try: unset my_array[1] > echo "Array [EMAIL PROTECTED]" -- Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com> =================================================================== Author: Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)