Following a recent discussion on the list I have given some thought to
making an option --nest.
--nest
Nest argument files. This changes the behaviour of :::: and -a. If
multiple files are given GNU Parallel will generate all combinations
of lines from each of the files and replace {1} .. {N} with a line
from each of the files. If file1 contains the lines "a b c" and file2
contains the lines "1 2", then "parallel echo {1} {2} :::: file1
file2" will print: a 1, b 1, c 1, a 2, b 2, c 2.
I see that this might be generally useful for replacing nested
for-loops, and I know I have had the need for this a few times. So far
I have not given much thought to how to implement it, but first I
would like your comments on this.
Do you have a better idea for the syntax? Should it be default (and
thus the current behaviour would require you to use --xapply)?
If --nest is combined with -X what would you expect that to do?
/Ole