foreach2
foreach2 ?-all? var1 list1 var2 list2 body
If the lists are not the same length, then the shorter list determines how many times the loop gets run.
If the -all
flag is specified, then the longer
list controls the running of the command. When the shorter list is exhausted, its
loop variable is set to the null value during running the loop body.