6
votes

Every day I have to update a bunch of repositories and also execute in some of them another command (from CARTON, Perl module dependency manager). I use always a loop to do that but I want do it parallely with GNU parallel if it is possible but I don't understand so well its tutorial.

The point more similar I've read that can help me is called "Running the same commands on all hosts" so I got into the directory with all repos and I tried to execute: parallel --onall carton but I don't know if it works or not. Anyone can help me?

1
Show the code you use now (i.e. your loop). - Ole Tange
To update repositories: for REPO in ls; do ( cd "$REPO"; git pull) ; done; To update dependencies: for REPO in ls; do ( cd "$REPO"; carton) ; done; - Noob_Number_1

1 Answers

7
votes
parallel 'cd {} && git pull' ::: *
parallel 'cd {} && carbon' ::: *