This is my case scenario:
luis@Balanceador:~$ echo ${array[@]}
a b
luis@Balanceador:~$ echo ${array[1]}
a
luis@Balanceador:~$ echo ${array[2]}
b
luis@Balanceador:~$ parallel echo ${array[]} ::: 1 2
-bash: ${array[]}: bad substitution
luis@Balanceador:~$ parallel echo ${array[{}]} ::: 1 2
-bash: {}: syntax error: operand expected (error token is "{}")
luis@Balanceador:~$ parallel echo ${array[{1}]} ::: 1 2
-bash: {1}: syntax error: operand expected (error token is "{1}")
luis@Balanceador:~$ parallel echo ${array[{#}]} ::: 1 2
-bash: {#}: syntax error: operand expected (error token is "{#}")
How can I reference the individuals elements of some array on GNU Parallel?
Sure this is an easy one, but I have not been able to find it on the manual.
This question has been made to answer this other, but, after asking it, I considered they were two different questions.
parallel echo ::: "${array[@]}"gnu parallelstarts sub-shells... how do you expect to access those variables if they're defined in sub-shells ? Runseq 3 | parallel echo $$(this is the shell that runsparallel) and then runseq 3 | parallel echo \$\$(these are sub-shells started byparallel)...