Although only 1½ people read this blog, I’m hoping I’ll get some responses to this puzzle. I figured out a solution, but I’m worried i was being too clever and that there’s an even simpler BASH way of handling this.

You receive a string of argument pairs like:

ARGSTRING="a1 a2 b1 b2 c1 c2 …"

You don’t know how long the ARGSTRING will be ahead of time. How do you take this list of argument pairs and send each pair to get processed by another command? In other words, let’s say you just want to echo out each pair, then your solution would run like:

solution $ARGSTRING

and produce:

a1 a2
b1 b2
c1 c2
…

Post your solutions!! Only use BASH, do not call external programs.