diff --git a/doc/release_new_version b/doc/release_new_version index 314089ce..2f520ec2 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -179,9 +179,9 @@ cc:Peter Simons , Sandro Cazzaniga , Ryoichiro Suzuki , Jesse Alama -Subject: GNU Parallel 20110922 ('Thorning-Schmidt') released +Subject: GNU Parallel 20111022 ('Ritchie') released -GNU Parallel 20110922 ('Thorning-Schmidt') has been released. It is +GNU Parallel 20111022 ('Ritchie') has been released. It is available for download at: http://ftp.gnu.org/gnu/parallel/ New in this release: @@ -189,12 +189,27 @@ New in this release: * --shellquote does not run the command but quotes it using \'s. Useful for making quoted composed commands. +* GNU Parallel officially in Fedora 16 + http://www.spinics.net/lists/fedora-package-announce/msg67130.html + * Blog post on recompression FLAC audio. http://blog.oxplot.com/2011/08/reflac-flac-cleanser.html * The most complex use of ::: I a seen so far. http://agentzlerich.blogspot.com/2011/09/following-up-on-previous-failures-ive.html +* Example of using GNU Parallel with sudo. + http://loopkid.net/articles/2011/10/07/recursive-chmod-and-chown-on-files + +* Use wget and gnu parallel to download mp3s at rocket speed. + http://sdbrain.posterous.com/use-wget-and-gnu-parallel-to-download-mp3s-at + +* First CV referring to GNU Parallel. + http://www.peopleperhour.com/freelancers/stephen_/internet_researcher_and_protocol_develop/140602 + +* Cartwright labs usage of GNU Parallel. + http://cartwrightlab.wikispaces.com/The+Most+Bang+for+Your+Buck + * Bug fixes and man page updates. diff --git a/packager/debian/Makefile b/packager/debian/Makefile index 3b5288e3..df069af1 100644 --- a/packager/debian/Makefile +++ b/packager/debian/Makefile @@ -14,7 +14,7 @@ build: cd parallel-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]; dpkg-buildpackage -us -uc @echo @echo "To install the GNU Parallel Debian package, run:" - @echo -e \\t sudo dpkg -i `ls -rt parallel_*_all.deb | tail -n 1` + @echo " sudo dpkg -i "`ls -rt parallel_*_all.deb | tail -n 1` clean: rm -f parallel_* diff --git a/src/parallel b/src/parallel index e3d8fda9..d4090dc0 100755 --- a/src/parallel +++ b/src/parallel @@ -425,7 +425,7 @@ sub options_hash { "arg-sep|argsep=s" => \$::opt_arg_sep, "arg-file-sep|argfilesep=s" => \$::opt_arg_file_sep, "trim=s" => \$::opt_trim, - "profile|J=s" => \$::opt_profile, + "profile|J=s" => \@::opt_profile, "pipe|spreadstdin" => \$::opt_pipe, "recstart=s" => \$::opt_recstart, "recend=s" => \$::opt_recend, @@ -733,8 +733,8 @@ sub read_options { } Getopt::Long::Configure("bundling","pass_through"); - # Check if there is a --profile to set $::opt_profile - GetOptions("profile|J=s" => \$::opt_profile) || die_usage(); + # Check if there is a --profile to set @::opt_profile + GetOptions("profile|J=s" => \@::opt_profile) || die_usage(); # Add options from .parallel/config and other profiles my @ARGV_profile = (); my @ARGV_env = (); @@ -743,9 +743,12 @@ sub read_options { $ENV{'HOME'}."/.parallel/config", $ENV{'HOME'}."/.parallelrc"); my @profiles = @config_profiles; - if($::opt_profile) { + if(@::opt_profile) { # --profile overrides default profiles - @profiles = ($ENV{'HOME'}."/.parallel/".$::opt_profile); + @profiles = (); + for my $profile (@::opt_profile) { + push @profiles, $ENV{'HOME'}."/.parallel/".$profile; + } } for my $profile (@profiles) { if(-r $profile) { diff --git a/src/parallel.pod b/src/parallel.pod index 0259b9eb..de71a404 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -809,7 +809,7 @@ line. This will set the owner of the homedir to the user: -B +B Implies B<-X> unless B<-m> or B<--pipe> is set. @@ -865,8 +865,12 @@ on remote computers. See the section PROFILE FILES for examples. I corresponds to the file ~/.parallel/I. +You can give multiple profiles by repeating B<--profile>. If parts of +the profiles conflict, the later ones will be used. + Default: config + =item B<--quote> =item B<-q> @@ -1923,12 +1927,15 @@ Convert *.mp3 to *.ogg running one process per CPU core on local computer and se To run the command B on remote computers you can do: -B +B B<--nonall> reads no arguments. If you have a list of jobs you want run on each computer you can do: -B +B + +Remove B<--tag> if you do not want the sshlogin added before the +output. If you have a lot of hosts use '-j0' to access more hosts in parallel. @@ -2414,7 +2421,13 @@ variable $PARALLEL which takes precedence over the file =head1 PROFILE FILES If B<--profile> set, GNU B will read the profile from that file instead of -~/.parallel/config. +~/.parallel/config. You can have multiple B<--profiles>. + +Example: Profile for running a command on every sshlogin in +~/.ssh/sshlogins and prepend the output with the sshlogin: + + echo --tag -S .. --nonall > ~/.parallel/n + parallel -Jn uptime Example: Profile for running every command with B<-j-1> and B diff --git a/testsuite/tests-to-run/test37.sh b/testsuite/tests-to-run/test37.sh index e87e5c2d..343ddd31 100644 --- a/testsuite/tests-to-run/test37.sh +++ b/testsuite/tests-to-run/test37.sh @@ -66,3 +66,8 @@ parallel -v -J test_profile '<(echo {})' ::: foo echo '### Test quoting of space in arguments (-S) from $PARALLEL' PARALLEL='-k --jobs 1 --sshlogin ssh\ '$SERVER1'\ ssh\ parallel@'$SERVER2' perl -pe "\\$a=1; print \\$a" ' parallel -v '<(echo {})' ::: foo + +echo '### Test merging of profiles - sort needed because -k only works on the single machine' +echo --tag > ~/.parallel/test_tag +echo -S .. > ~/.parallel/test_S.. +parallel -Jtest_tag -Jtest_S.. --nonall echo a | sort diff --git a/testsuite/wanted-results/test37 b/testsuite/wanted-results/test37 index e9447701..6bf985e4 100644 --- a/testsuite/wanted-results/test37 +++ b/testsuite/wanted-results/test37 @@ -57,3 +57,6 @@ perl -pe '$a=1; print $a' <(echo foo) ### Test quoting of space in arguments (-S) from $PARALLEL perl -pe "\$a=1; print \$a" <(echo foo) 1foo +### Test merging of profiles - sort needed because -k only works on the single machine +parallel-server3 a +parallel@parallel-server2 a