On Mon, Mar 21, 2016 at 4:37 PM, Ali Roustaei <ali.ros...@gmail.com> wrote: > Hello, > > My script (say myscript) has three input parameters H, Re and Bn. Re and Bn > are tied so that for each Re input there is only a specific Bn. > > I want parallel to run all combinations of H with Bn,Re and not generate > combinations between Re and Bn. In terms of gnu parallel I want -xapply for > Re, Bn and usual combination for H with them. > > For example the below shows what I would like parallel to run. Imagine the > inputs: > > H inputs: A B > Re inputs: C D E > Bn inputs: F G H > (So C corresponds to F, D to G and E to H) > > myscript A C F > myscript A D G > myscript A E H > > myscript B C F > myscript B D G > myscript B E H
Currently this is not possible using a single command, but I have had this problem, too, so I would welcome a patch that made it possible. My suggestion for syntax would be to introduce a modifier on the argument separator. Something like +: parallel myscript ::: A B ::: C D E :::+ F G H And if the input source is a file: parallel myscript ::: A B ::: C D E ::::+ fgh-file The idea being that :::+ links the following input source to the previous --xapply style. Normal --xapply would then be possible to do like this: parallel myscript ::: C D E :::+ F G H For your current situation this may work: parallel --xapply -I ,, --arg-sep ,,, parallel eval echo myscript {} ,, ::: A B ,,, C D E ,,, F G H /Ole