Just thinking about a variable array and i'd like to if possible...
when working with an array simply add a value to the array at the next available slot/number so to speak.
i have an array:-
array=( `echo 1 2 3 4` )
this obviously giving me 4 values in my array
Instead of then having to do something like:-
((number++)) #add one
Is it possible to not have to know the next number in the array so the value can just be added to the next available slot in the array so to speak. ie
rather than going through the rigmarole of all that above. It would be much nicer if its possible to just say chuck this value anywhere in the array as i don't care where it goes. Just as long as its not overwriting something already in the array, and is using the next available number in the array so that when you do something like:-
you still get returned the correct numbers of 5 and 1 2 3 4 5