I am trying to merge two arrays into one in a zipper like fashion. I have difficulty to make that happen.
array1=(one three five seven) array2=(two four six
Assuming both arrays are the same size,
unset result for (( i=0; i<${#array1[*]}; ++i)); do result+=( "${array1[$i]}" "${array2[$i]}" ) done