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 $
I believe this solution is a little cleaner than the others that have been submitted, h/t to this bash style guide for illustrating how read can be used to split strings at a delimiter and assign them to individual variables.
for i in c,3 e,5; do
IFS=',' read item1 item2 <<< "${i}"
echo "${item1}" and "${item2}"
done