> Print BASH Array Elements on Separate Lines
Very easy and usually accomplished with a loop: $ array=(red green blue) $ for I in ${array[@]}; do echo $I; done red green blue But we can do better!: $ printf '%s\n' "${array[@]}" or: $ ( IFS=$'\n'; echo "${array[*]}" ) Note the switch to "${array[*]}" from "${array[@]}" (the "quoting" is important!…