Following is how to dynamically append (push) items to an array in a bash script.
declare -a ARRAY=()
ARRAY=("${ARRAY[@]}" "item1")
ARRAY=("${ARRAY[@]}" "item2")
Principal Software Engineer/Architect, motorcyclist, drummer, and artist
Following is how to dynamically append (push) items to an array in a bash script.
declare -a ARRAY=()
ARRAY=("${ARRAY[@]}" "item1")
ARRAY=("${ARRAY[@]}" "item2")