I wants to loop thru two strings that has the same delimiter and same number of items in bash shell.
I am currently do this:
string1=s1,s2,s3,s4
string2=a1,a2,a3,a4
IFS=','
count=0
for i in ${string1[@]}
do
echo $i
echo $count
// how can I get each item in string2?
count=$((count+1))
done
As far as I know, I cannot loop thru two string at the same time. How can I get each item in string 2 inside the loop?