parallel
[Top][All Lists]
Advanced

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

Re: pid_parentpid_cmd for MSWin32 missing


From: Ole Tange
Subject: Re: pid_parentpid_cmd for MSWin32 missing
Date: Sun, 5 Apr 2015 11:19:51 +0200

On Sun, Apr 5, 2015 at 10:12 AM, Tzafrir Poupko <address@hidden> wrote:

> I had to change the command:

Why?

> 3451,3452c3451,3452
> <           my $sysv = q( ps -ef | perl -ane '1..1 and /^(.*)CO?MM?A?N?D/
> and $s=length $1;).
> <               q(s/^.{$s}//; print "@F[1,2] $_"' );
> ---
>>           my $sysv = q( ps -ef | perl -ane "1..1 and /^(.*)CO?MM?A?N?D/
>> and $s=length $1;).
>>               q(s/^.{$s}//; print address@hidden,2] $_}" );

That will not work. Remember that " is not the same as '. $s, $1 and
$_ are now quoted wrongly, and will cause it to fail miserably when
run.

> It is still not working, but now with other errors:
>
> ~/tmp/parallel/src $ Can't find string terminator "'" anywhere before EOF at
> -e line 1.

Yes. That is expected from your change.

Can I ask you again to test this on the command line:

    ps -ef | perl -ane '1..1 and /^(.*)CO?MM?A?N?D/ and $s=length
$1;s/^.{$s}//; print "@F[1,2] $_"'

>From your output it seems this version will work.


/Ole



reply via email to

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