parallel
[Top][All Lists]
Advanced

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

Re: --nest for nested argument files


From: Hans Schou
Subject: Re: --nest for nested argument files
Date: Wed, 4 May 2011 18:11:24 +0200 (CEST)
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

On Wed, 4 May 2011, Ole Tange wrote:

On Wed, May 4, 2011 at 4:21 PM, Ole Tange <tange@gnu.org> wrote:

Hans' example with wav files could then be written as:

parallel oggenc -q {1} {2} {2.}_{1}.ogg ::: 1 5 10 :::: wavfiles

or

parallel oggenc -q {1} {2} {2.}_{1}.ogg ::: 1 5 10 ::: *.wav

or

ls *.wav | parallel oggenc -q {1} {2} {2.}_{1}.ogg ::: 1 5 10 :::: -

Looks good. So, all these does the same:

ls *.wav > list

parallel echo {1} {2} ::: 1 2 3 :::: list
parallel echo {1} {2} ::: $(seq 3) ::: *.wav
parallel echo {1} {2} :::: <(seq 3) list
parallel -a <(seq 3) echo {1} {2} ::: *.wav
parallel -a <(seq 3) -a list echo {1} {2}
parallel -a <(seq 3) -a <(ls *.wav) echo {1} {2}
ls *.wav | parallel -a <(seq 3) echo {1} {2} :::: -

Is it really necessary to have the last ':::: -' ?
Will this not do?
  ls *.wav | parallel -a <(seq 3) echo {2} {1}

The problem with these approaches is that if one of the files is
called ':::' or '::::' then this will no longer work because the :::
or :::: will confuse GNU Parallel:

It is not very often I give my files that name.

Is this syntax too weird? Would it make sense anyway?

I think it is good.

/hans
--
Horsebakken 78, DK-2400 København NV

reply via email to

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