I am trying to run a program with different arguments which are read from a bash array. So far I had been doing
x=(0.1 0.2 0.3) # the arguments
This would run my_program for all arguments in parallel.
I have been trying to achieve the same result using GNU parallel but have not been able to so far. I have been trying (I have replace my_program by echo for simplicity)
(1) seq 0 1 2 | parallel echo ${x[{1}]}
(2) seq 0 1 2 | parallel echo $"{"x[{1}]"}"
(3) seq 0 1 2 | parallel echo \${x[{1}]}
(1) bash: {1}: syntax error: operand expected (error token is "{1}")
Is there any way to get what is expected, i.e.
I have read the parallel manual about quoting but have not worked it out completely... Thanks in advance for any suggestions!