Command | Case |
---|---|
array[${#array[*]}]="$variable |
Indexed at zero |
array[${#array[*]}+1]="$variab |
Indexed at one |
I haven't found an easier way, but several harder ways to do this. The harder ways often include some sort of loop or creating a new array with the same name and appending the new value to the old values.