parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash arrays in parallel


From: giorgos sermaidis
Subject: Re: bash arrays in parallel
Date: Tue, 10 Jan 2012 16:17:08 +0000 (GMT)

Thanks to everyone. All your suggestions work perfectly!


From: Ole Tange <tange@gnu.org>
To:
Cc: "parallel@gnu.org" <parallel@gnu.org>
Sent: Tuesday, 10 January 2012, 15:06
Subject: Re: bash arrays in parallel

On Mon, Jan 9, 2012 at 4:11 PM, Cook, Malcolm <MEC@stowers.org> 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

[Prev in Thread] Current Thread [Next in Thread]