From ebac7477d7f1c66732f6e186ebcf869bce5803e7 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sat, 15 Oct 2011 00:21:23 +0200 Subject: [PATCH] parallel: --bibtex implemented --- src/parallel | 24 ++++++++++++++++++++++++ src/parallel.pod | 10 +++++----- src/sql | 5 +++++ 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/parallel b/src/parallel index d4090dc0..4e451657 100755 --- a/src/parallel +++ b/src/parallel @@ -436,6 +436,7 @@ sub options_hash { "tollef" => \$::opt_tollef, "gnu" => \$::opt_gnu, "xapply" => \$::opt_xapply, + "bibtex" => \$::opt_bibtex, # xargs-compatibility - implemented, man, testsuite "max-procs|P=s" => \$::opt_P, "delimiter|d=s" => \$::opt_d, @@ -567,6 +568,7 @@ sub parse_options { print Limits::Command::real_max_length(),"\n"; wait_and_exit(0); } if(defined $::opt_version) { version(); wait_and_exit(0); } + if(defined $::opt_bibtex) { bibtex(); wait_and_exit(0); } if(defined $::opt_show_limits) { show_limits(); } if(defined @::opt_sshlogin) { @Global::sshlogin = @::opt_sshlogin; } if(defined $::opt_sshloginfile) { read_sshloginfile($::opt_sshloginfile); } @@ -1727,6 +1729,28 @@ sub version { ); } +sub bibtex { + # Returns: N/A + if($::opt_tollef and not $::opt_gnu) { + print "WARNING: YOU ARE USING --tollef. USE --gnu FOR GNU PARALLEL\n\n"; + } + print join("\n", + "\@article{Tange2011,", + " title = {GNU Parallel - The Command-Line Power Tool},", + " author = {O. Tange},", + " address = {Frederiksberg, Denmark},", + " journal = {;login: The USENIX Magazine},", + " month = {Feb},", + " number = {1},", + " volume = {36},", + " url = {http://www.gnu.org/s/parallel},", + " year = {2011},", + " pages = {42-47}", + "}", + "", + ); +} + sub show_limits { # Returns: N/A print("Maximal size of command: ",Limits::Command::real_max_length(),"\n", diff --git a/src/parallel.pod b/src/parallel.pod index de71a404..7450a947 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -465,9 +465,9 @@ reversed with B<-u>. Group output. Output from each jobs is grouped together and is only printed when the command is finished. stderr (standard error) first followed by stdout (standard output). This takes some CPU time. In -rare situations GNU Parallel takes up lots of CPU time and if it is +rare situations GNU B takes up lots of CPU time and if it is acceptable that the output from different commands are mixed together, -then disabling grouping with B<-u> can speedup GNU Parallel by a +then disabling grouping with B<-u> can speedup GNU B by a factor of 10. B<--group> is the default. Can be reversed with B<-u>. @@ -933,7 +933,7 @@ Only used with B<--pipe>. =item B<--retries> I If a job fails, retry it on another computer. Do this I times. If -there are fewer than I computers in B<--sshlogin> GNU parallel will +there are fewer than I computers in B<--sshlogin> GNU B will re-use the computers. This is useful if some jobs fail for no apparent reason (such as network failure). @@ -2104,7 +2104,7 @@ same time: =head1 EXAMPLE: Start editor with filenames from stdin (standard input) -You can use GNU Parallel to start interactive programs like emacs or vi: +You can use GNU B to start interactive programs like emacs or vi: B @@ -3127,7 +3127,7 @@ make them by something like B>B. =head1 AUTHOR -When using GNU Parallel for a publication please cite: +When using GNU B for a publication please cite: O. Tange (2011): GNU Parallel - The Command-Line Power Tool, ;login: The USENIX Magazine, February 2011:42-47. diff --git a/src/sql b/src/sql index 87c02fed..750710a6 100755 --- a/src/sql +++ b/src/sql @@ -327,6 +327,11 @@ GNU B is part of GNU B. Report bugs to . =head1 AUTHOR +When using GNU B for a publication please cite: + +O. Tange (2011): GNU SQL - A Command Line Tool for Accessing Different +Databases Using DBURLs, ;login: The USENIX Magazine, April 2011:29-32. + Copyright (C) 2008,2009,2010 Ole Tange http://ole.tange.dk Copyright (C) 2010,2011 Ole Tange, http://ole.tange.dk and Free