bugGNU Parallel - Bugs: bug #45691, Accessing multiple arguments in {=...

 
 

bug #45691: Accessing multiple arguments in {= =}

Submitter:  Ole Tange <tange>
Submitted:  Tue 04 Aug 2015 01:53:34 PM UTC
   
 
Category:  None Severity:  1 - Wish
Item Group:  None Status:  In Progress
Privacy:  Public Assigned to:  tange
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 16 Aug 2015 10:19:48 AM UTC, comment #1: 

Readonly version in [2e6a701f9]:

parallel -N2 echo '{= $arg[1] eq 3 and $_=8 =}' ::: 3 4

Ole Tange <tange>
Group administrator
Tue 04 Aug 2015 01:53:34 PM UTC, original submission:  

When reading multiple arguments {1} {2} it would be nice if you could easily access each argument in a simple way. E.g. as @arg

{= if($arg[1] gt $arg[2]) { $arg[1]++ } =}

Problem:

If $arg[1] changed, should $_ be recomputed?

What if both are changed:

{= if($arg[1] gt $arg[2]) { $arg[1]++; $_.="ged" } =}


Ole Tange <tange>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tange (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-08-16 tange StatusNone In Progress
        Assigned toNone tange

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code