[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
--nest for nested argument files
From: |
Ole Tange |
Subject: |
--nest for nested argument files |
Date: |
Tue, 3 May 2011 01:07:40 +0200 |
Following a recent discussion on the list I have given some thought to
making an option --nest.
--nest
Nest argument files. This changes the behaviour of :::: and -a. If
multiple files are given GNU Parallel will generate all combinations
of lines from each of the files and replace {1} .. {N} with a line
from each of the files. If file1 contains the lines "a b c" and file2
contains the lines "1 2", then "parallel echo {1} {2} :::: file1
file2" will print: a 1, b 1, c 1, a 2, b 2, c 2.
I see that this might be generally useful for replacing nested
for-loops, and I know I have had the need for this a few times. So far
I have not given much thought to how to implement it, but first I
would like your comments on this.
Do you have a better idea for the syntax? Should it be default (and
thus the current behaviour would require you to use --xapply)?
If --nest is combined with -X what would you expect that to do?
/Ole
- --nest for nested argument files,
Ole Tange <=
- Re: --nest for nested argument files, Hans Schou, 2011/05/03
- Re: --nest for nested argument files, Rhys Ulerich, 2011/05/03
- Re: --nest for nested argument files, Ole Tange, 2011/05/03
- Re: --nest for nested argument files, Benjamin R. Haskell, 2011/05/04
- Re: --nest for nested argument files, Matt Oates (Home), 2011/05/06
- Re: --nest for nested argument files, Ole Tange, 2011/05/06
- Message not available
- Re: --nest for nested argument files, Ole Tange, 2011/05/06
Re: --nest for nested argument files, Ole Tange, 2011/05/03