On 9 January 2012 02:30, giorgos sermaidis <[email protected]> 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:
#!/bin/bash
x=(0.1 0.2 0.3)
echo ${x[@]} | parallel -d' ' my_program
Regards
Martin
