Released as 20220122 ('20 years')

This commit is contained in:
Ole Tange 2022-01-22 17:00:32 +01:00
parent 16e6fb9a65
commit be43ddb832
27 changed files with 219 additions and 130 deletions

23
NEWS
View file

@ -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:

24
README
View file

@ -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

20
configure vendored
View file

@ -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 <bug-parallel@gnu.org>.
#
@ -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\\"

View file

@ -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([

View file

@ -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:

View file

@ -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,6 +162,9 @@ https://negfeedback.blogspot.com/2020/05/indispensable-command-line-tools.html
=== Used ===
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

View file

@ -254,27 +254,32 @@ from:tange@gnu.org
to:parallel@gnu.org, bug-parallel@gnu.org
stable-bcc: Jesse Alama <jessealama@fastmail.fm>
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.>>
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

View file

@ -1,7 +1,7 @@
<directory name="parallel" rev="317" vrev="1" srcmd5="e846e607bc463efd4dcef96a779f85a1">
<entry name="PKGBUILD" md5="b96ad8edb325e80e5aba8b32d5254f78" size="936" mtime="1640129207" />
<entry name="parallel-20211222.tar.bz2" md5="b309c72c1397097ef7a70e1389d5f747" size="2267915" mtime="1640129208" />
<entry name="parallel.spec" md5="d52fefe84eec835ff08d7e3643f74e0b" size="5630" mtime="1640129208" />
<entry name="parallel_20211222.dsc" md5="4438eb9e04d278e2d900438461ac0139" size="556" mtime="1640129208" />
<entry name="parallel_20211222.tar.gz" md5="75f015315f2b351a62f31c9b59795f41" size="2512216" mtime="1640129208" />
<directory name="parallel" rev="318" vrev="1" srcmd5="16362175e423388a2d90f50e327a5f86">
<entry name="PKGBUILD" md5="13671e63cef1b613f22bc2ba917472bb" size="936" mtime="1642866613" />
<entry name="parallel-20220122.tar.bz2" md5="b329b388156cffcc7532177563c18010" size="2287354" mtime="1642866614" />
<entry name="parallel.spec" md5="db6dadee7fa550909ed6ccf044bb6a1e" size="5630" mtime="1642866614" />
<entry name="parallel_20220122.dsc" md5="2674e2b3a719e15e10dc420b3f6dc358" size="556" mtime="1642866614" />
<entry name="parallel_20220122.tar.gz" md5="3dc0cc653208ab5272d75d7f9189e481" size="2526577" mtime="1642866614" />
</directory>

View file

@ -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

View file

@ -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

View file

@ -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 <https://gnu.org/licenses/gpl.html>"

View file

@ -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 <https://gnu.org/licenses/gpl.html>"

View file

@ -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 <https://gnu.org/licenses/gpl.html>"

View file

@ -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 <https://gnu.org/licenses/gpl.html>"

View file

@ -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 <https://gnu.org/licenses/gpl.html>"

View file

@ -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 <https://gnu.org/licenses/gpl.html>"

View file

@ -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 <https://gnu.org/licenses/gpl.html>"

View file

@ -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) {

View file

@ -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

View file

@ -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<mytime>
@ -1453,12 +1457,14 @@ See also: B<--group> B<--ungroup>
=item B<--link>
Link input sources. Read multiple input sources like the command
B<xapply>. 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<{>I<n>B<}>, 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<xapply>. 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<{>I<n>B<}>, 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<max-load>
@ -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<parallel>
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<size>
@ -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<parallel> SIGUSR2 you can toggle turning on/off
B<--progress> on a running GNU B<parallel> process.
See also: B<--eta> and B<--bar>.
See also: B<--eta> B<--bar>
=item B<--max-line-length-allowed>
@ -2269,26 +2275,42 @@ it possible to define your own replacement strings. GNU B<parallel>'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<export -f >
anything. See B<env_parallel>.
can copy the full environment without having to
B<export -f> anything. See B<env_parallel>.
=head2 EXAMPLE: Function tester
@ -4407,6 +4429,20 @@ If not all hosts are accessible through TOR:
See more B<ssh> 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<sshpass>:
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<sshpass> so use the '4/' syntax to tell the server has 4 cores.
=head2 EXAMPLE: Use outrun instead of ssh
B<outrun> lets you run a command on a remote server. B<outrun> sets up

View file

@ -839,7 +839,7 @@ B<$PARALLEL_SHELL>.
If the command is a simple command with no redirection and setting of
variables, the command I<could> be run without spawning a
shell. E.g. this simple B<grep> matching either 'ls ' or ' wc >> c':
shell. E.g. this simple B<grep> matching either 'ls ' or ' wc E<gt>E<gt> 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<grep> regexp? Is B<LANG=C> a command in B<csh> or
setting a variable in B<bash>? Is B<>>> redirection or part of a
regexp?).
It is impossible to tell how B<| wc E<gt>E<gt> c> should be
interpreted without parsing the string (is the B<|> a pipe in shell or
an alternation in a B<grep> regexp? Is B<LANG=C> a command in B<csh>
or setting a variable in B<bash>? Is B<E<gt>E<gt>> redirection or part
of a regexp?).
On top of this, wrapper scripts will often require a shell to be
spawned.

View file

@ -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)]);

View file

@ -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

View file

@ -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://
}

View file

@ -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
</tmp/parallel-decimal perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 0 129450 |(true)
</tmp/parallel-decimal perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 129450 129450 |(true)
</tmp/parallel-decimal perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 258900 129450 |(true)
</tmp/parallel-decimal perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 388350 129450 |(true)
</tmp/parallel-decimal perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 517800 71095 |(true)
</tmp/parallel-decimal perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>32767?32767:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 0 129450 |(true)
</tmp/parallel-decimal perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>32767?32767:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 129450 129450 |(true)
</tmp/parallel-decimal perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>32767?32767:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 258900 129450 |(true)
</tmp/parallel-decimal perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>32767?32767:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 388350 129450 |(true)
</tmp/parallel-decimal perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>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

View file

@ -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

View file

@ -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
<num30000 perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>131072?131072:$left)){$left-=$read;syswrite(STDOUT,$buf);}}' 0 0 0 168894 |(wc)
<num30000 perl -e 'while(@ARGV){sysseek(STDIN,shift,0)||die;$left=shift;while($read=sysread(STDIN,$buf,$left>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