Morning,
I'm currently in a situation where I have to repeat a command for several datasets and am wondering, if there is a more elegant solution than nesting loops or building a dedicated program.
So basically something like:
> echo "Hello from [NYC,Chicago] to [Berlin,Paris]"
Hello from NYC to Berlin
Hello from NYC to Paris
Hello from Chicago to Berlin
Hello from Chicago to Paris
Sure, some "for i in x,y,z
"-magic would work, but that gets hard to read as soon as multiple datasets are involved.
Is there a way to easily iterate over multiple datasets in Bash? How would you solve this to keep it somewhat readable?