I just started using gnu-parallel. I am trying to feed parallel with several variables. Suppose I have a text file (foo.txt) with the content below,
> cat foo.txt
a b c
d e f
Now, if I run the below command,
> range=$(eval echo {10..15})
> parallel -a foo.txt --colsep=' ' echo {} {#} {1} {2} {3} ::: $range
instead of getting,
10 1 a b c
11 2 a b c
12 3 a b c
13 4 a b c
14 5 a b c
15 6 a b c
10 7 d e f
11 8 d e f
12 9 d e f
14 11 d e f
15 12 d e f
13 10 d e f
I get this,
a b c 10 1 a b c
a b c 11 2 a b c
a b c 12 3 a b c
a b c 13 4 a b c
a b c 14 5 a b c
a b c 15 6 a b c
d e f 10 7 d e f
d e f 11 8 d e f
d e f 12 9 d e f
d e f 14 11 d e f
d e f 15 12 d e f
d e f 13 10 d e f
How can I do it right?