|
From: | Tzafrir Poupko |
Subject: | Re: pid_parentpid_cmd for MSWin32 missing |
Date: | Mon, 13 Apr 2015 14:23:35 +0300 |
Hi,Sorry for the long delay in my response, it took me a while to get back to this.when I try the command in msys bash I getPID PPID COMMAND5324 1 /msys/bin/bash5976 5324 /msys/bin/bash6184 5324 /msys/bin/psBut when I try in command line, I getCan't find string terminator "'" anywhere before EOF at -e line 1.It seems that perl runs new process under a windows command prompt, and not under bash.So the quotes are not parsed correctlyThanks,TzafrirOn Sun, Apr 5, 2015 at 12:19 PM, Ole Tange <tange@gnu.org> wrote:On Sun, Apr 5, 2015 at 10:12 AM, Tzafrir Poupko <tzafrir@ceemple.com> 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 qq{@F[1,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:
/Ole
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.
[Prev in Thread] | Current Thread | [Next in Thread] |