[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Avoiding cross product of lists
From: |
Ole Tange |
Subject: |
Re: Avoiding cross product of lists |
Date: |
Thu, 26 Jun 2014 03:33:14 +0200 |
On Wed, Jun 25, 2014 at 8:20 PM, Rob Sargent <robjsargent@gmail.com> wrote:
> I cannot find an example of supplying two arguments from lists which does
> not result in the cross product of the two lists.
> p1 uses c1 c2 c3
> p2 uses c4 c7
> p3 uses c1 c5 c9
>
> I cannot construct a parallel command which accomplishes the task of running
> my programme J 8 times as:
> J p1 c1
> J p1 c2
> J p1 c3
> J p2 c4
> J p2 c7
> J p3 c1
> J p3 c5
> j p3 c9
>
> Is there such a construct?
Either use --xapply or --colsep:
parallel --xapply --dryrun J ::: p1 p1 p1 p2 p2 p3 p3 p3 ::: c1 c2 c3
c4 c7 c1 c5 c9
input.tsv:
p1 c1
p1 c2
p1 c3
p2 c4
p2 c7
p3 c1
p3 c5
p3 c9
parallel --colsep ' ' -a input.tsv --dryrun J
/Ole