|
From: | Jay Hacker |
Subject: | Re: Multiple complex replacements per command? |
Date: | Mon, 19 Nov 2012 13:18:55 -0500 |
On Thu, Nov 15, 2012 at 7:21 PM, Jay Hacker <jayqhacker@gmail.com> wrote:The problem boils down to how do you determine what are arguments
> I'd like to be able to give as many parameters as will fit on a command
> line, so I can fork less jobs:
>
> $ seq 4 | parallel -??? echo "'a {} b {}'"
> a 1 b 1 a 2 b 2 a 3 b 3 a 4 b 4
>
> I looked into -X, -L, -n, -m, --xargs, and variations, but none of them seem
> to do what I want. Is there a way to do this with parallel?
without parsing the line?
What should these give:
seq 4 | parallel -??? echo "'a {} b {}'"\; echo foo
seq 4 | parallel -??? echo -n "'a {} b {}'"\; echo foo
seq 4 | parallel -??? echo "'a {} b {}'" -n \; echo foo
seq 4 | parallel -??? 'echo "a {} b {}"; echo foo'
seq 4 | parallel -??? echo -n "'a {} b {}'; echo" foo
seq 4 | parallel -??? echo "'a {} b {}'" -n \; echo foo
Right now I try to adhere to principle of least surprise.
You _can_ do this:
seq 4 | parallel -j1 -X echo a_{}_b_{}
/Ole
[Prev in Thread] | Current Thread | [Next in Thread] |