parallel
[Top][All Lists]
Advanced

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

Re: Syntax - your opinion wanted


From: Ole Tange
Subject: Re: Syntax - your opinion wanted
Date: Fri, 7 Aug 2015 08:20:39 +0200

On Fri, Aug 7, 2015 at 12:17 AM, Cook, Malcolm <address@hidden> wrote:
:
> parallel echo '{= $_ = ($arg[1] > 1 ? "a" : "b") =}' ::: 0 ::: 2
>
> should echo "b" to stdout since zero is not greater than one

You are treating $_ as if the change happens to the whole string - not
the individual parameters. Given that, what should this do:

parallel echo '{= $_ =~ s/.jpg// =}' ::: a.jpg ::: b.jpg


/Ole



reply via email to

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