I have 2 arrays that refer to files for example
alpha=file 1
beta=file2
Charlie=file3
delta=file4
beta2=file5
beta3=file6
Charlie2=file7
charlie3=file8
delta2=file9
delta3=file10
array1=("$alpha" "$beta" "$Charlie" "$delta)
array2=("$beta2" "$beta3" "$Charlie2" "$Charlie3" "$delta1 "$delta3")
Then I have an algorithm that goes through and uses these files together example
for ((i=0;2;i++))
do
for((j=0;2;j++))
do
./${array1[$i]}.sh ${array2[$j]}.in
done
done
Problem is I would like the array1 and array 2 to correspond such that
it would be for example
./file2.sh file5.in
But I can never get it to do it because of course when j resets for each loop of i. What is the solution for this?