Maybe I'm over-thinking this but here's my desired output:
one four seven
one five eight
one six nine
two four seven
two five eight
two six nine
three four seven
three five eight
three six nine
Here's what I started. I got to the second for loop and totally lost my mind trying to find the solution.
#!/bin/bash
declare -a aaa=("four" "five" "six")
declare -a bbb=("one" "two" "three")
declare -a ccc=("seven" "eight" "nine")
for bs in ${bbb[@]}; do
for as in ${aaa[@]}, cs in ${ccc[@]}; do
echo "$bs" "$as" "$cs"
done
done