bugGNU Parallel - build and execute command lines from standard input in parallel - Bugs: bug #37351, Passing environment variables to...

 
 

bug #37351: Passing environment variables to remote hosts

Submitted by:  Ole Tange <tange>
Submitted on:  Fri 14 Sep 2012 01:25:21 PM UTC  
Votes:  1  
 
Category: NoneSeverity: 1 - Wish
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Ole Tange <tange>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 15 Oct 2012 01:52:16 PM UTC, comment #2:

Fixed in [dd5093f8].

Ole Tange <tange>
Project AdministratorIn charge of this item.
Mon 01 Oct 2012 07:38:20 PM UTC, comment #1:

Remember testing --env A,B -env C

Ole Tange <tange>
Project AdministratorIn charge of this item.
Fri 14 Sep 2012 01:25:21 PM UTC, original submission:

Sometimes you set environment variables that you would like your job to see.

If the jobs are running on your local host (:) then exporting the variables will work fine.

VAR=" oo ba "
export VAR
parallel echo f'"$VAR"'r ::: quux

But if the jobs is run remotely then you need to do:

parallel -S n VAR=$(parallel --shellquote ::: "$VAR")\; echo f'"$VAR"'r ::: quux

This will have to be done for each environment variable.

As that is hard to read we might have an option --env which will copy the variables to the remote machine:

parallel --env VAR -S n echo f'"$VAR"'r ::: quux

parallel --env VAR,VAR1,VAR2 -S n echo f'"$VAR"'r ::: quux

parallel --env VAR --env VAR1,VAR2 -S n echo f'"$VAR"'r ::: quux

Ole Tange <tange>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pmdubuc (Voted in favor of this item)
  • -unavailable- added by tange (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 1 encouragement so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 15 Oct 2012 01:52:16 PM UTCtangeStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Mon 01 Oct 2012 07:38:20 PM UTCtangeStatusConfirmed=>In Progress
    Fri 14 Sep 2012 05:37:30 PM UTCpmdubucCarbon-Copy-=>Added pmdubuc

    Back to the top


    Powered by Savane 3.1-cleanup1