parallel
[Top][All Lists]
Advanced

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

Re: Difference between single and double quotes for parallel?


From: Maciej Pilichowski
Subject: Re: Difference between single and double quotes for parallel?
Date: Thu, 16 Dec 2010 07:42:23 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

Hello,

On 12/16/2010 12:26 AM, Ole Tange wrote:
On Wed, Dec 15, 2010 at 11:25 AM, Maciej Pilichowski
<pilichowski.maciej@gmail.com>  wrote:

  In order to preserve the space within some argument, normally you would
enclose it in double quotes.

Start by reading the man page on QUOTING.

There is a slight problem, because I read the EXAMPLES section too, and one section says one thing, and the second another.

EXAMPLES:
Another solution is to quote the whole command:
parallel "zcat {} >{.}" ::: *.gz

QUOTING:
For example this will not work:
ls *.gz | parallel -q "zcat {} >{.}"

You repeated the quoting statement here, so I guess the latter is true.



Thank you for all explanations and help, I will test them one by one, to get some experience in general.

Please provide a full example and explanation of what it does and what
you expected it to do. It is unclear what you mean by the above. This
works as expected:

$ FN=a
$ echo 1 | parallel echo $FN
# prints a 1

I would like to call composed command. So something like this

FN=something with space
cat my_file | parallel script1 "{}" "$FN" \; script2 "{}" "$FN"

Both script1 and script2 should get 2 arguments, the second should be "something with space" (first script1 should be executed, when it finishes -- script2).

Remark: I am not fully sure, if I did all the quoting correctly here because I didn't do my "homework" (see above).

Kind regards,



reply via email to

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