I am trying to generate a new array, with the combination of other arrays, respecting a specific sequence. In pure Bash. Example:
numbers=(0 1 2 3 4 5 6 7 8);
colors=(red blue green);
loop_sequence=(numbers numbers colors numbers colors colors)
Example of out:
0
1
red
2
blue
green
3
4
red
5
blue
green
6
7
red
8
blue
green
0
1
red
2
blue
green...
But I find very difficult to make the internal loops of iterations. Any help is very welcome.