bug-parallel
[Top][All Lists]
Advanced

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

Re: GNU Parallel Bug Reports Running parallel from perl system() with re


From: Josef wells
Subject: Re: GNU Parallel Bug Reports Running parallel from perl system() with redirects
Date: Wed, 14 Jan 2015 17:47:50 +0000

Yeah, I agree this was the right thing for parallel to do.  I hate that perl uses /bin/sh, but I'm more likely to use something else than is perl to change.

I don't call perl from the command line normally, that was just for ease of reproduction.

Thanks everyone!

Josef


On Tue, Jan 13, 2015, 23:17 Andreas Bernauer <address@hidden> wrote:
In 20140822, parallel changed which shell it uses to execute its
commands, see https://savannah.gnu.org/forum/forum.php?forum_id=8067

IMHO, using /bin/sh is the "only correct thing to do" for perl (and for
parallel, btw, but I don't want to start that discussion again).

I think that your the quote-mess is due to calling perl from the command
line. ;-)

-Andreas

On 13/01/15 22:47, Josef wells wrote:
> Ok, so sorry, the command should be:
> perl -e "system('parallel --joblog - ::: \'echo hello >& hello_log\' >
> joblog 2>&1');"
>
> I bisected the releases and found the release that changes this is 20140822.
>
> The problem is the shell that perl is using to do system().
>
> I fixed it by being explicit to use bash.
>
> perl -e "system('/bin/bash -c \"parallel --joblog - ::: \'echo hello >&
> hello_log\' > joblog 2>&1\"');"
>
> I think what parallel is doing is correct, but I do hate that PERL uses
> /bin/sh and doesn't make this such a quote-mess.
>
> parallel is great
> all hail parallel
>
> -Josef
>
>
> On Tue Jan 13 2015 at 12:40:55 AM Josef wells
> <address@hidden <mailto:address@hiddenutexas.net>> wrote:
>
>     I have a problem that did not happen with version:
>     GNU parallel 20130822
>     But does happen with:
>     GNU parallel 20141122
>
>     This works:
>     parallel --joblog - ::: 'cat hello >& hello_log' > joblog 2>&1
>
>     But it doesn't work from inside a perl program.
>     perl -e "system('parallel --joblog - ::: \'cat hello >& hello_log\'
>     > joblog 2>&1');"
>     joblog contains the error:
>     /bin/sh: 1: Syntax error: Bad fd number
>
>     You can take out the --joblog -, as that just makes something useful
>     go to the parallel output redirect.
>
>     I posted this to the main parallel list, but I didn't see it show
>     up, so maybe I don't understand how to internet.
>
>     -Josef
>

reply via email to

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