If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
One thing to note. Although it displays properly, the array variable is actually null. There fore you still have 5 elements in the array. If this is a problem you can reset the entire array like this:
Code:
$ set -A MY_ARRAY 11 12 13 14 15
$ echo ${MY_ARRAY[@]}
11 12 13 14 15
$
$ MY_ARRAY[2]=''
$ echo ${MY_ARRAY[@]} #Array still has 5 elements. Just one is null.
11 12 14 15
$
$ echo ${MY_ARRAY[2]} #This is now Null.
$
$ set -A MY_ARRAY `echo ${MY_ARRAY[@]}` #Reset Array to 4 elements
$ echo ${MY_ARRAY[2]}
14
$