On 9 January 2012 02:30, giorgos sermaidis wrote:
> Hello all,
>
> 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
>
> for i in $(seq 0 1 2)
> do
> my_program ${x[$i]} &
> done
>
Correct is:
#!/
On Mon, Jan 9, 2012 at 4:11 PM, Cook, Malcolm wrote:
> parallel my_program ::: ${x[@]}
That works if x does not contain spaces. If you have special chars in
the variable and you want each element to be interpreted separately
(i.e. do not split on space) try:
x=("My brother's 12\" records are
Thanks to everyone. All your suggestions work perfectly!
From: Ole Tange
To:
Cc: "[email protected]"
Sent: Tuesday, 10 January 2012, 15:06
Subject: Re: bash arrays in parallel
On Mon, Jan 9, 2012 at 4:11 PM, Cook, Malcolm wrote:
> parallel my_program :::