How can I add a new line to following bash array? The get_group is a function, it assigns a list of members in a group to the GROUP, but the statement GroupList+=${GROUP} stacks the end of the first group and the start of the second group in one line, I tried to add new line to the array, that does not work at all
declare -a GroupList=()
for i in $(seq 1 3); do
GROUP=$(get_group ${i})
GroupList+=${GROUP}
GroupList+="\n" # does not work
done