Thanks to everyone. All your suggestions work perfectly!


________________________________
 From: Ole Tange <[email protected]>
To: 
Cc: "[email protected]" <[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 <[email protected]> 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 worth <\$\$\$>"'!' 0.2 0.3)
  parallel echo ::: "${x[@]}"

/Ole

Reply via email to