Is there a way to append an Array element in bash? For Example:
$ declare -a MY_ARR=('Bob' 'Jim Jim' 'Dug Dug' 'Mark Mark')
$ echo "${MY_ARR[0]}"
Bob
$ MY_ARR[0]<< "bob"
$ echo "${MY_ARR[0]}"
Bob bob
I'm pretty sure that there is a relatively simple way of doing this in PHP but I can't seem to find a bash solution.
Just to clarify I want to add something to the current array element not overwrite it.
EDIT: I want to append a current Array ELEMENT not add another element to the array. It is the actual array ELEMENT contents that I want to edit.