On Sun, Apr 5, 2015 at 10:12 AM, Tzafrir Poupko <[email protected]> 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:
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