parallel
[Top][All Lists]
Advanced

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

Re: Passing multiple flags in a single {} replacement


From: Ole Tange
Subject: Re: Passing multiple flags in a single {} replacement
Date: Tue, 15 May 2012 01:36:47 +0200

On Mon, May 14, 2012 at 8:06 PM, Alastair Andrew <a.andrew@strath.ac.uk> wrote:
> Hi Ole,
>
> If I manually run ls -a -l from the command line I get the usual long 
> directory listing showing all the chmod info, file owner, size, date, name 
> for the files and directories (including the hidden files). If I run parallel 
> -v -bash -c ls ::: "-l -a" I don't get that. I just get the regular ls output 
> (albeit parallel reports it as one item per line).

You are right, you need to quote the space to make it a single
argument for bash:

parallel -v touch {1}\; bash -c ls\\\ {2} ::: "my file" ::: "-l -a"

Or:

parallel -v touch {1}\; bash -c 'ls\ '{2} ::: "my file" ::: "-l -a"

It is starting to look ugly. Maybe I should re-introduce the option
for not having the arguments quoted. It The combined (above) will
still look the same but the non-combined would look like:

parallel -v --no-quoting ls {} ::: "-l -a"

which might be easier to read. The option was removed 20101129.


/Ole



reply via email to

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