Is it possible to loop over tuples in bash?
As an example, it would be great if the following worked:
for (i,j) in ((c,3), (e,5)); do echo \"$i and $
In cases where my tuple definitions are more complex, I prefer to have them in a heredoc:
while IFS=", " read -ra arr; do echo "${arr[0]} and ${arr[1]}" done <
This combines looping over lines of a heredoc with splitting the lines at some desired separating character.