diff --git a/NEWS b/NEWS index 86c5a3f3..ef446634 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,26 @@ +20220122 + +New in this release: + +* GNU Parallel turned 20 on the 2022-01-06 + https://www.gnu.org/software/parallel/20th-birthday.html + +* Bug fixes and man page updates. + +News about GNU Parallel: + +* Save Time with Modern Search Techniques + https://www.eventbrite.com/e/ohio-information-security-forum-january-2022-monthly-meeting-tickets-240632737997 + +* Bash "Fail immediately if any fails" + https://morioh.com/p/a01b883dc57c + +* Re-encoding the EmacsConf videos with FFmpeg and GNU Parallel + https://sachachua.com/blog/2021/12/re-encoding-the-emacsconf-videos-with-ffmpeg-and-gnu-parallel/ + +* Bash 平行 https://learntutorials.net/ja/bash/topic/10778/%E5%B9%B3%E8%A1%8C + + 20211222 New in this release: diff --git a/README b/README index c157dda0..df836ccf 100644 --- a/README +++ b/README @@ -57,11 +57,11 @@ document. Full installation of GNU Parallel is as simple as: - wget https://ftpmirror.gnu.org/parallel/parallel-20211222.tar.bz2 - wget https://ftpmirror.gnu.org/parallel/parallel-20211222.tar.bz2.sig - gpg parallel-20211222.tar.bz2.sig - bzip2 -dc parallel-20211222.tar.bz2 | tar xvf - - cd parallel-20211222 + wget https://ftpmirror.gnu.org/parallel/parallel-20220122.tar.bz2 + wget https://ftpmirror.gnu.org/parallel/parallel-20220122.tar.bz2.sig + gpg parallel-20220122.tar.bz2.sig + bzip2 -dc parallel-20220122.tar.bz2 | tar xvf - + cd parallel-20220122 ./configure && make && sudo make install @@ -70,11 +70,11 @@ Full installation of GNU Parallel is as simple as: If you are not root you can add ~/bin to your path and install in ~/bin and ~/share: - wget https://ftpmirror.gnu.org/parallel/parallel-20211222.tar.bz2 - wget https://ftpmirror.gnu.org/parallel/parallel-20211222.tar.bz2.sig - gpg parallel-20211222.tar.bz2.sig - bzip2 -dc parallel-20211222.tar.bz2 | tar xvf - - cd parallel-20211222 + wget https://ftpmirror.gnu.org/parallel/parallel-20220122.tar.bz2 + wget https://ftpmirror.gnu.org/parallel/parallel-20220122.tar.bz2.sig + gpg parallel-20220122.tar.bz2.sig + bzip2 -dc parallel-20220122.tar.bz2 | tar xvf - + cd parallel-20220122 ./configure --prefix=$HOME && make && make install Or if your system lacks 'make' you can simply copy src/parallel @@ -122,8 +122,8 @@ will love you for it. When using programs that use GNU Parallel to process data for publication please cite: - Tange, O. (2021, December 22). GNU Parallel 20211222 ('Støjberg'). - Zenodo. https://doi.org/10.5281/zenodo.5797028 + Tange, O. (2022, January 22). GNU Parallel 20220122 ('20 years'). + Zenodo. https://doi.org/10.5281/zenodo.5893336 Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ole Tange, http://ole.tange.dk and diff --git a/configure b/configure index 9f88ff19..d1bf1054 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for parallel 20211222. +# Generated by GNU Autoconf 2.69 for parallel 20220122. # # Report bugs to . # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='parallel' PACKAGE_TARNAME='parallel' -PACKAGE_VERSION='20211222' -PACKAGE_STRING='parallel 20211222' +PACKAGE_VERSION='20220122' +PACKAGE_STRING='parallel 20220122' PACKAGE_BUGREPORT='bug-parallel@gnu.org' PACKAGE_URL='' @@ -1214,7 +1214,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures parallel 20211222 to adapt to many kinds of systems. +\`configure' configures parallel 20220122 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1281,7 +1281,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of parallel 20211222:";; + short | recursive ) echo "Configuration of parallel 20220122:";; esac cat <<\_ACEOF @@ -1357,7 +1357,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -parallel configure 20211222 +parallel configure 20220122 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1374,7 +1374,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by parallel $as_me 20211222, which was +It was created by parallel $as_me 20220122, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2237,7 +2237,7 @@ fi # Define the identity of the package. PACKAGE='parallel' - VERSION='20211222' + VERSION='20220122' cat >>confdefs.h <<_ACEOF @@ -2880,7 +2880,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by parallel $as_me 20211222, which was +This file was extended by parallel $as_me 20220122, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2942,7 +2942,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -parallel config.status 20211222 +parallel config.status 20220122 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 28ce65dc..d5d761f9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([parallel],[20211222],[bug-parallel@gnu.org]) +AC_INIT([parallel],[20220122],[bug-parallel@gnu.org]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ diff --git a/doc/citation-notice-faq.txt b/doc/citation-notice-faq.txt index 62f222e8..5c087d87 100644 --- a/doc/citation-notice-faq.txt +++ b/doc/citation-notice-faq.txt @@ -35,6 +35,10 @@ Therefore the notice is not adding a term that would require citation as mentioned on: https://www.gnu.org/licenses/gpl-faq.en.html#RequireCitation +The link only addresses the license and copyright law. It does not +address academic tradition, and the citation notice only refers to +academic tradition. + If you disagree with Richard M. Stallman's interpretation and feel the citation notice does not adhere to GPLv3, you should treat the software as if it is not available under GPLv3. And since GPLv3 is the @@ -106,7 +110,7 @@ do not have to cite GNU Parallel. If it is too much work replacing the use of GNU Parallel, then it is a good indication that the contribution to the research is big enough to warrant a citation. -The citation is also needed for reproducibility. Let us assume a bug +The citation is also needed for reproducibility: Let us assume a bug in GNU Parallel skews the results. People replicating the research needs to have the information, so they can replicate the (possibly wrong) results. @@ -132,7 +136,7 @@ refer to peer-reviewed articles - others do not: * https://github.com/UnixJunkie/PAR/blob/master/README The CITATION.cff file format was designed to make it easy to cite -software, and +software, and used by a wide range of tools. == I do not like the notice. Can I fork GNU Parallel and remove it? == @@ -249,14 +253,18 @@ should probably not be using it anyway. If you care so little about GNU Parallel that you do not want to help finance development, then you should contemplate whether GNU Parallel -is really the right tool for you. +is really the right tool for you. Personally I would prefer if you +simply ignored GNU Parallel and treated it as if it did not exist. -It is, however, doable (e.g. by forking and changing the code; see -above). But you will be going against the wishes of the author, -because you make it harder to make a living, thus you will be making -it harder to justify producing more free software. If you like GNU -Parallel and want to see it maintained in the future, then this is not -the way to go. +But if you really insist on not helping, it is possible (e.g. by +forking and changing the code; see above). But you will be going +against the wishes of the author, because you make it harder to make a +living, thus you will be making it harder to justify producing more +free software; not only for me, but also for others who see you +actively working against the author's wishes. + +If you like GNU Parallel and want to see it maintained in the future, +then this is not the way to go. Maybe it is you Nadia Eghbal addresses in https://www.slideshare.net/NadiaEghbal/consider-the-maintainer: diff --git a/doc/haikus b/doc/haikus index 4648d21c..d1269668 100644 --- a/doc/haikus +++ b/doc/haikus @@ -4,6 +4,14 @@ Quote of the month: + Igual @GnuParallel te puede echar una mano. Te permite pensar y + programar en serie pero ejecutar en paralelo usando cores de una + máquina o máquinas remotas. Una vez que lo has usando te lamentas no + haberlo conocido antes :) + -- Juan Sierra Pons @juasiepo + + + If I could only keep 5 GNU utils, parallel would make it to the list :) -- 5heikki@reddit @@ -154,7 +162,10 @@ https://negfeedback.blogspot.com/2020/05/indispensable-command-line-tools.html === Used === - My favorite man page is that of GNU parallel. + I'm going to make GNU parallel my new superpower this year. + -- Christian G. Warden @xn@twitter + +My favorite man page is that of GNU parallel. -- Jeroen Janssens @jeroenhjanssens@twitter GNU parallel 便利すぎ diff --git a/doc/release_new_version b/doc/release_new_version index d3a4a267..7c0c7ec5 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -254,27 +254,32 @@ from:tange@gnu.org to:parallel@gnu.org, bug-parallel@gnu.org stable-bcc: Jesse Alama -Subject: GNU Parallel 20220122 ('Kazakhstan/James Webb/Tutu/Pillar of Shame<<>>') released <<[stable]>> +Subject: GNU Parallel 20220122 ('20 years') released [stable] -GNU Parallel 20220122 ('<<>>') <<[stable]>> has been released. It is available for download at: lbry://@GnuParallel:4 +GNU Parallel 20220122 ('20 years') [stable] has been released. It is available for download at: lbry://@GnuParallel:4 -<> +No new functionality was introduced so this is a good candidate for a stable release. Quote of the month: - <<>> + I'm going to make GNU parallel my new superpower this year. + -- Christian G. Warden @xn@twitter New in this release: +* GNU Parallel turned 20 on the 2022-01-06 https://www.gnu.org/software/parallel/20th-birthday.html + * Bug fixes and man page updates. News about GNU Parallel: -* https://morioh.com/p/a01b883dc57c +* Save Time with Modern Search Techniques https://www.eventbrite.com/e/ohio-information-security-forum-january-2022-monthly-meeting-tickets-240632737997 -https://sachachua.com/blog/2021/12/re-encoding-the-emacsconf-videos-with-ffmpeg-and-gnu-parallel/ -https://learntutorials.net/ja/bash/topic/10778/%E5%B9%B3%E8%A1%8C -<<>> +* Bash "Fail immediately if any fails" https://morioh.com/p/a01b883dc57c + +* Re-encoding the EmacsConf videos with FFmpeg and GNU Parallel https://sachachua.com/blog/2021/12/re-encoding-the-emacsconf-videos-with-ffmpeg-and-gnu-parallel/ + +* Bash 平行 https://learntutorials.net/ja/bash/topic/10778/%E5%B9%B3%E8%A1%8C Get the book: GNU Parallel 2018 http://www.lulu.com/shop/ole-tange/gnu-parallel-2018/paperback/product-23558902.html diff --git a/packager/obs/home:tange/parallel/.osc/_files b/packager/obs/home:tange/parallel/.osc/_files index b2bfc0d9..cd72a721 100644 --- a/packager/obs/home:tange/parallel/.osc/_files +++ b/packager/obs/home:tange/parallel/.osc/_files @@ -1,7 +1,7 @@ - - - - - - + + + + + + diff --git a/packager/obs/home:tange/parallel/.osc/parallel.spec b/packager/obs/home:tange/parallel/.osc/parallel.spec index b284bd13..a40f40f2 100644 --- a/packager/obs/home:tange/parallel/.osc/parallel.spec +++ b/packager/obs/home:tange/parallel/.osc/parallel.spec @@ -1,7 +1,7 @@ Summary: Shell tool for executing jobs in parallel Name: parallel -Version: 20211222 +Version: 20220122 Release: 1.3 License: GPL-3.0-or-later Group: Productivity/File utilities diff --git a/src/env_parallel b/src/env_parallel index b60ebfa6..945437f8 100755 --- a/src/env_parallel +++ b/src/env_parallel @@ -79,14 +79,15 @@ done cat <<'_EOS' -env_parallel only works if it is a function. Do the below and restart your shell. +env_parallel only works if it is a function. + +Do this and restart your shell: bash: Put this in $HOME/.bashrc: . `which env_parallel.bash` E.g. by doing: echo '. `which env_parallel.bash`' >> $HOME/.bashrc Supports: variables, aliases, functions, arrays -fish: Put this in $HOME/.config/fish/config.fish: - . (which env_parallel.fish) +fish: Put this in $HOME/.config/fish/config.fish: . (which env_parallel.fish) E.g. by doing: echo '. (which env_parallel.fish)' >> $HOME/.config/fish/config.fish Supports: variables, aliases, functions, arrays diff --git a/src/env_parallel.ash b/src/env_parallel.ash index 5211b353..40063a11 100755 --- a/src/env_parallel.ash +++ b/src/env_parallel.ash @@ -385,7 +385,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20211222 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220122 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.bash b/src/env_parallel.bash index 535d1604..011a4670 100755 --- a/src/env_parallel.bash +++ b/src/env_parallel.bash @@ -62,8 +62,9 @@ env_parallel() { typeset -p "$@" } _ignore_HARDCODED() { - # These names cannot be detected - echo '(_|TIMEOUT|GROUPS|FUNCNAME|DIRSTACK|PIPESTATUS|USERNAME|BASHPID|BASH_[A-Z_]+)' + # Copying $RANDOM will cause it not to be random + # The rest cannot be detected as read-only + echo '(RANDOM|_|TIMEOUT|GROUPS|FUNCNAME|DIRSTACK|PIPESTATUS|USERNAME|BASHPID|BASH_[A-Z_]+)' } _ignore_READONLY() { # shellcheck disable=SC1078,SC1079,SC2026 @@ -384,7 +385,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20211222 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220122 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.dash b/src/env_parallel.dash index da668dd5..281649f4 100755 --- a/src/env_parallel.dash +++ b/src/env_parallel.dash @@ -385,7 +385,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20211222 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220122 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.ksh b/src/env_parallel.ksh index 514b40bd..6b379b46 100755 --- a/src/env_parallel.ksh +++ b/src/env_parallel.ksh @@ -363,7 +363,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20211222 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220122 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.mksh b/src/env_parallel.mksh index 964beeae..523a419a 100644 --- a/src/env_parallel.mksh +++ b/src/env_parallel.mksh @@ -365,7 +365,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20211222 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220122 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.sh b/src/env_parallel.sh index 7b14ca73..2095802a 100755 --- a/src/env_parallel.sh +++ b/src/env_parallel.sh @@ -390,7 +390,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20211222 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220122 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.zsh b/src/env_parallel.zsh index d078cf4e..e6c97904 100755 --- a/src/env_parallel.zsh +++ b/src/env_parallel.zsh @@ -355,7 +355,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20211222 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220122 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/niceload b/src/niceload index a656ef43..52fa88f5 100755 --- a/src/niceload +++ b/src/niceload @@ -26,7 +26,7 @@ use strict; use Getopt::Long; $Global::progname="niceload"; -$Global::version = 20211222; +$Global::version = 20220122; Getopt::Long::Configure("bundling","require_order"); get_options_from_array(\@ARGV) || die_usage(); if($opt::version) { diff --git a/src/parallel b/src/parallel index 9e5b0f72..9ea69033 100755 --- a/src/parallel +++ b/src/parallel @@ -2296,7 +2296,7 @@ sub check_invalid_option_combinations() { sub init_globals() { # Defaults: - $Global::version = 20211222; + $Global::version = 20220122; $Global::progname = 'parallel'; $::name = "GNU Parallel"; $Global::infinity = 2**31; @@ -5114,8 +5114,8 @@ sub usage() { "If you use programs that use GNU Parallel to process data for an article in a", "scientific publication, please cite:", "", - " Tange, O. (2021, December 22). GNU Parallel 20211222 ('Støjberg').", - " Zenodo. https://doi.org/10.5281/zenodo.5797028", + " Tange, O. (2022, January 22). GNU Parallel 20220122 ('20 years').", + " Zenodo. https://doi.org/10.5281/zenodo.5893336", "", # Before changing these lines, please read # https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice @@ -5147,8 +5147,8 @@ sub citation_notice() { "If you use programs that use GNU Parallel to process data for an article in a", "scientific publication, please cite:", "", - " Tange, O. (2021, December 22). GNU Parallel 20211222 ('Støjberg').", - " Zenodo. https://doi.org/10.5281/zenodo.5797028", + " Tange, O. (2022, January 22). GNU Parallel 20220122 ('20 years').", + " Zenodo. https://doi.org/10.5281/zenodo.5893336", "", # Before changing these line, please read # https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice and @@ -5273,20 +5273,20 @@ sub citation() { "If you use programs that use GNU Parallel to process data for an article in a", "scientific publication, please cite:", "", - "\@software{tange_2021_5797028,", + "\@software{tange_2022_5893336,", " author = {Tange, Ole},", - " title = {GNU Parallel 20211222 ('Støjberg')},", - " month = Dec,", + " title = {GNU Parallel 20220122 ('20 years')},", + " month = Jan,", " year = 2021,", " note = {{GNU Parallel is a general parallelizer to run", " multiple serial command line programs in parallel", " without changing them.}},", " publisher = {Zenodo},", - " doi = {10.5281/zenodo.5797028},", - " url = {https://doi.org/10.5281/zenodo.5797028}", + " doi = {10.5281/zenodo.5893336},", + " url = {https://doi.org/10.5281/zenodo.5893336}", "}", "", - "(Feel free to use \\nocite{tange_2021_5797028})", + "(Feel free to use \\nocite{tange_2022_5893336})", "", # Before changing these lines, please read # https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice and diff --git a/src/parallel.pod b/src/parallel.pod index a0189825..2e2c6424 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -778,6 +778,10 @@ When used with B<--pipe> only pass full CSV-records. Color tag. +If the values look very similar looking at the output it can be hard +to tell when a new value is used. B<--ctag> gives each value a random +color. + See also: B<--tag> @@ -785,7 +789,7 @@ See also: B<--tag> Color tagstring. -See also: B<--tagstring> +See also: B<--ctag> B<--tagstring> =item B<--delay> I @@ -1453,12 +1457,14 @@ See also: B<--group> B<--ungroup> =item B<--link> -Link input sources. Read multiple input sources like the command -B. If multiple input sources are given, one argument will be -read from each of the input sources. The arguments can be accessed in -the command as B<{1}> .. B<{>IB<}>, so B<{1}> will be a line from -the first input source, and B<{6}> will refer to the line with the -same line number from the 6th input source. +Link input sources. + +Read multiple input sources like the command B. If multiple +input sources are given, one argument will be read from each of the +input sources. The arguments can be accessed in the command as B<{1}> +.. B<{>IB<}>, so B<{1}> will be a line from the first input source, +and B<{6}> will refer to the line with the same line number from the +6th input source. Compare these two: @@ -1470,7 +1476,7 @@ Arguments will be recycled if one input source has more arguments than the other parallel --link echo {1} {2} {3} \ ::: 1 2 ::: I II III ::: a b c d e f g -See also B<--header>, B<:::+>, B<::::+>. +See also: B<--header> B<:::+> B<::::+> =item B<--load> I @@ -1522,7 +1528,7 @@ put back on the queue to be run later. B<--retries> must be set to determine how many times GNU B should retry a given job. -See also: B<--termseq>, B<--retries>, B<--memsuspend> +See also: B<--termseq> B<--retries> B<--memsuspend> =item B<--memsuspend> I @@ -1669,8 +1675,8 @@ The data can be spread between the jobs in specific ways using B<--round-robin>, B<--bin>, B<--shard>, B<--group-by>. See the section: SPREADING BLOCKS OF DATA -See also: B<--block>, B<--blocktimeout>, B<--recstart>, B<--recend>, -B<--fifo>, B<--cat>, B<--pipepart>, B<-N>, B<-L>. +See also: B<--block> B<--blocktimeout> B<--recstart> B<--recend> +B<--fifo> B<--cat> B<--pipepart> B<-N> B<-L> =item B<--pipepart> @@ -1699,7 +1705,7 @@ where records end. =back -See also: <--pipe>. +See also: <--pipe> =item B<--plain> @@ -1767,7 +1773,7 @@ everything at startup. By sending GNU B SIGUSR2 you can toggle turning on/off B<--progress> on a running GNU B process. -See also: B<--eta> and B<--bar>. +See also: B<--eta> B<--bar> =item B<--max-line-length-allowed> @@ -2263,32 +2269,48 @@ it possible to define your own replacement strings. GNU B's --rpl '{%} 1 $_=$job->slot()' --rpl '{/} s:.*/::' --rpl '{//} $Global::use{"File::Basename"} ||= - eval "use File::Basename; 1;"; $_ = dirname($_);' + eval "use File::Basename; 1;"; $_ = dirname($_);' --rpl '{/.} s:.*/::; s:\.[^/.]+$::;' --rpl '{.} s:\.[^/.]+$::' The B<--plus> replacement strings are implemented as: - --rpl '{+/} s:/[^/]*$::' - --rpl '{+.} s:.*\.::' - --rpl '{+..} s:.*\.([^.]*\.):$1:' - --rpl '{+...} s:.*\.([^.]*\.[^.]*\.):$1:' - --rpl '{..} s:\.[^/.]+$::; s:\.[^/.]+$::' - --rpl '{...} s:\.[^/.]+$::; s:\.[^/.]+$::; s:\.[^/.]+$::' - --rpl '{/..} s:.*/::; s:\.[^/.]+$::; s:\.[^/.]+$::' - --rpl '{/...} s:.*/::;s:\.[^/.]+$::;s:\.[^/.]+$::;s:\.[^/.]+$::' - --rpl '{##} $_=total_jobs()' - --rpl '{:-(.+?)} $_ ||= $$1' + --rpl '{+/} s:/[^/]*$:: || s:.*$::' + --rpl '{+.} s:.*\.:: || s:.*$::' + --rpl '{+..} s:.*\.([^/.]+\.[^/.]+)$:$1: || s:.*$::' + --rpl '{+...} s:.*\.([^/.]+\.[^/.]+\.[^/.]+)$:$1: || s:.*$::' + --rpl '{..} s:\.[^/.]+\.[^/.]+$::' + --rpl '{...} s:\.[^/.]+\.[^/.]+\.[^/.]+$::' + --rpl '{/..} s:.*/::; s:\.[^/.]+\.[^/.]+$::' + --rpl '{/...} s:.*/::; s:\.[^/.]+\.[^/.]+\.[^/.]+$::' + --rpl '{choose_k} + for $t (2..$#arg){ if($arg[$t-1] ge $arg[$t]) { skip() } }' + --rpl '{##} 1 $_=total_jobs()' + --rpl '{0%} 1 $f=1+int((log($Global::max_jobs_running||1)/ + log(10))); $_=sprintf("%0${f}d",slot())' + --rpl '{0#} 1 $f=1+int((log(total_jobs())/log(10))); + $_=sprintf("%0${f}d",seq())' + + --rpl '{:-([^}]+?)} $_ ||= $$1' --rpl '{:(\d+?)} substr($_,0,$$1) = ""' --rpl '{:(\d+?):(\d+?)} $_ = substr($_,$$1,$$2);' - --rpl '{#([^#].*?)} s/^$$1//;' - --rpl '{%(.+?)} s/$$1$//;' - --rpl '{/(.+?)/(.*?)} s/$$1/$$2/;' - --rpl '{^(.+?)} s/^($$1)/uc($1)/e;' - --rpl '{^^(.+?)} s/($$1)/uc($1)/eg;' - --rpl '{,(.+?)} s/^($$1)/lc($1)/e;' - --rpl '{,,(.+?)} s/($$1)/lc($1)/eg;' + --rpl '{#([^#}][^}]*?)} $nongreedy=::make_regexp_ungreedy($$1); + s/^$nongreedy(.*)/$1/;' + --rpl '{##([^#}][^}]*?)} s/^$$1//;' + --rpl '{%([^}]+?)} $nongreedy=::make_regexp_ungreedy($$1); + s/(.*)$nongreedy$/$1/;' + --rpl '{%%([^}]+?)} s/$$1$//;' + --rpl '{/([^}]+?)/([^}]*?)} s/$$1/$$2/;' + --rpl '{^([^}]+?)} s/^($$1)/uc($1)/e;' + --rpl '{^^([^}]+?)} s/($$1)/uc($1)/eg;' + --rpl '{,([^}]+?)} s/^($$1)/lc($1)/e;' + --rpl '{,,([^}]+?)} s/($$1)/lc($1)/eg;' + --rpl '{slot} 1 $_="\${PARALLEL_JOBSLOT}";uq()' + --rpl '{host} 1 $_="\${PARALLEL_SSHHOST}";uq()' + --rpl '{sshlogin} 1 $_="\${PARALLEL_SSHLOGIN}";uq()' + --rpl '{hgrp} 1 $_="\${PARALLEL_HOSTGROUPS}";uq()' + --rpl '{agrp} 1 $_="\${PARALLEL_ARGHOSTGROUPS}";uq()' If the user defined replacement string starts with '{' it can also be used as a positional replacement string (like B<{2.}>). @@ -3381,8 +3403,8 @@ B<--env>: parallel --env doubleit -S server doubleit ::: 1 2 3 ::: a b If your environment (aliases, variables, and functions) is small you -can copy the full environment without having to B -anything. See B. +can copy the full environment without having to +B anything. See B. =head2 EXAMPLE: Function tester @@ -4407,6 +4429,20 @@ If not all hosts are accessible through TOR: See more B tricks on https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_Jump_Hosts +=head2 EXAMPLE: Use sshpass with ssh + +If you cannot use passwordless login, you may be able to use B: + + export SSHPASS=MyPa$$w0rd + seq 10 | + parallel -S '4/sshpass -e ssh user-with-password@server' echo + seq 10 | + parallel --ssh 'sshpass -e ssh' -S 4/user-with-password@server' echo + +Currently the remote detection of CPU cores is incompatible with +B so use the '4/' syntax to tell the server has 4 cores. + + =head2 EXAMPLE: Use outrun instead of ssh B lets you run a command on a remote server. B sets up diff --git a/src/parallel_design.pod b/src/parallel_design.pod index bf82e9b3..3d098513 100644 --- a/src/parallel_design.pod +++ b/src/parallel_design.pod @@ -839,7 +839,7 @@ B<$PARALLEL_SHELL>. If the command is a simple command with no redirection and setting of variables, the command I be run without spawning a -shell. E.g. this simple B matching either 'ls ' or ' wc >> c': +shell. E.g. this simple B matching either 'ls ' or ' wc EE c': parallel "grep -E 'ls | wc >> c' {}" ::: foo @@ -853,11 +853,11 @@ be spawned: parallel "grep -E 'ls | wc >> c' {} | wc >> c" ::: foo parallel "LANG=C grep -E 'ls | wc >> c' {}" ::: foo -It is impossible to tell how B<| wc >>>B< c> should be interpreted -without parsing the string (is the B<|> a pipe in shell or an -alternation in a B regexp? Is B a command in B or -setting a variable in B? Is B<>>> redirection or part of a -regexp?). +It is impossible to tell how B<| wc EE c> should be +interpreted without parsing the string (is the B<|> a pipe in shell or +an alternation in a B regexp? Is B a command in B +or setting a variable in B? Is BE> redirection or part +of a regexp?). On top of this, wrapper scripts will often require a shell to be spawned. diff --git a/src/parsort b/src/parsort index dfd22c7f..5414ffd7 100755 --- a/src/parsort +++ b/src/parsort @@ -122,7 +122,7 @@ GetOptions( "help" => \$opt::dummy, ) || exit(255); $Global::progname = ($0 =~ m:(^|/)([^/]+)$:)[1]; -$Global::version = 20211222; +$Global::version = 20220122; if($opt::version) { version(); exit 0; } @Global::sortoptions = grep { ! /^-D$/ } shell_quote(@ARGV_before[0..($#ARGV_before-$#ARGV-1)]); diff --git a/src/sql b/src/sql index f9a3f30f..66a906f9 100755 --- a/src/sql +++ b/src/sql @@ -600,7 +600,7 @@ $Global::Initfile && unlink $Global::Initfile; exit ($err); sub parse_options { - $Global::version = 20211222; + $Global::version = 20220122; $Global::progname = 'sql'; # This must be done first as this may exec myself diff --git a/testsuite/REQUIREMENTS b/testsuite/REQUIREMENTS index 7ff7e91f..500f62cf 100644 --- a/testsuite/REQUIREMENTS +++ b/testsuite/REQUIREMENTS @@ -99,7 +99,10 @@ install_oracle_client() { fi perl -MCPAN -e 'install DBD::Oracle' # TODO set up vagrant oracle server + git clone https://github.com/oracle/vagrant-projects.git # TODO set up default passwd + echo sudo su - oracle -c "'/home/oracle/setPassword.sh $oracle_password'" | + vagrant ssh # test it works: sql oracle:// } diff --git a/testsuite/wanted-results/parallel-local22 b/testsuite/wanted-results/parallel-local22 index 3e5687a9..df6cd711 100644 --- a/testsuite/wanted-results/parallel-local22 +++ b/testsuite/wanted-results/parallel-local22 @@ -75,11 +75,11 @@ parallel: Error: --pipepart is incompatible with --max-replace-args, --max-lines echo '### bug #42893: --block should not cause decimals in cat_partial' ### bug #42893: --block should not cause decimals in cat_partial seq 100000 >/tmp/parallel-decimal; parallel --dry-run -kvv --pipepart --block 0.12345M -a /tmp/parallel-decimal true; rm /tmp/parallel-decimal -131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 0 129450 |(true) -131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 129450 129450 |(true) -131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 258900 129450 |(true) -131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 388350 129450 |(true) -131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 517800 71095 |(true) +32767?32767:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 0 129450 |(true) +32767?32767:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 129450 129450 |(true) +32767?32767:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 258900 129450 |(true) +32767?32767:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 388350 129450 |(true) +32767?32767:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 517800 71095 |(true) echo '### bug #42892: parallel -a nonexiting --pipepart' ### bug #42892: parallel -a nonexiting --pipepart parallel --pipepart -a nonexisting wc diff --git a/testsuite/wanted-results/parallel-macos b/testsuite/wanted-results/parallel-macos index f176e0c2..5c8a0d1b 100644 --- a/testsuite/wanted-results/parallel-macos +++ b/testsuite/wanted-results/parallel-macos @@ -1,12 +1,12 @@ -par_big_func 1 7964 191136 -par_big_func 1 5372 128868 +par_big_func 1 7968 191232 +par_big_func 1 5368 128772 par_big_func_name 1 4960 119040 par_big_func_name 1 40 960 par_big_var_func_name 1 4956 118944 par_big_var_func_name 1 4956 118944 par_big_var_func_name 1 3424 82116 -par_many_args 1 16396 32792 -par_many_args 1 3604 7208 +par_many_args 1 16400 32800 +par_many_args 1 3600 7200 par_many_func 1 4372 104928 par_many_func 1 2296 55076 par_many_var 1 5124 122976 diff --git a/testsuite/wanted-results/parallel-tutorial b/testsuite/wanted-results/parallel-tutorial index 28edc6ef..8e2c8609 100644 --- a/testsuite/wanted-results/parallel-tutorial +++ b/testsuite/wanted-results/parallel-tutorial @@ -727,12 +727,12 @@ Unknown option: parallel@lo Unknown option: myecho $myvar Unknown option: ::: Unknown option: green -env_parallel only works if it is a function. Do the below and restart your shell. +env_parallel only works if it is a function. +Do this and restart your shell: bash: Put this in $HOME/.bashrc: . `which env_parallel.bash` E.g. by doing: echo '. `which env_parallel.bash`' >> $HOME/.bashrc Supports: variables, aliases, functions, arrays -fish: Put this in $HOME/.config/fish/config.fish: - . (which env_parallel.fish) +fish: Put this in $HOME/.config/fish/config.fish: . (which env_parallel.fish) E.g. by doing: echo '. (which env_parallel.fish)' >> $HOME/.config/fish/config.fish Supports: variables, aliases, functions, arrays @@ -779,6 +779,7 @@ BASH_FUNC_run_once%% BASH_FUNC_run_test%% _ mysqlrootpass +withpassword # The function is only copied if using Bash my_func2() { echo in my_func2 $VAR $1 @@ -801,12 +802,12 @@ Unknown option: parallel@lo Unknown option: echo $NOT; not_ex Unknown option: ::: Unknown option: bar -env_parallel only works if it is a function. Do the below and restart your shell. +env_parallel only works if it is a function. +Do this and restart your shell: bash: Put this in $HOME/.bashrc: . `which env_parallel.bash` E.g. by doing: echo '. `which env_parallel.bash`' >> $HOME/.bashrc Supports: variables, aliases, functions, arrays -fish: Put this in $HOME/.config/fish/config.fish: - . (which env_parallel.fish) +fish: Put this in $HOME/.config/fish/config.fish: . (which env_parallel.fish) E.g. by doing: echo '. (which env_parallel.fish)' >> $HOME/.config/fish/config.fish Supports: variables, aliases, functions, arrays @@ -838,7 +839,7 @@ To install in all shells run: env_parallel --install For details: see man env_parallel parallel -vv --pipepart --block 1M wc :::: num30000 -131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 0 168894 |(wc) +32767?32767:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 0 168894 |(wc) 30000 30000 168894 my_func3() { echo in my_func $1 > $1.out @@ -1285,4 +1286,4 @@ mentioned in the release notes of next version of GNU Parallel. echo A echo B echo C -7 +8