2015-04-04 14:37:32 +00:00
|
|
|
### test parallel_tutorial
|
2019-05-05 23:06:48 +00:00
|
|
|
fetch -o - http://pi.dk/3 ) > install.sh
|
|
|
|
$ sha1sum install.sh
|
2023-10-16 11:47:02 +00:00
|
|
|
12345678 51621b7f 1ee103c0 0783aae4 ef9889f8
|
2019-05-05 23:06:48 +00:00
|
|
|
$ md5sum install.sh
|
2023-10-16 11:47:02 +00:00
|
|
|
62eada78 703b5500 241b8e50 baf62758
|
2019-05-05 23:06:48 +00:00
|
|
|
$ sha512sum install.sh
|
2023-10-16 11:47:02 +00:00
|
|
|
160d3159 9480cf5c a101512f 150b7ac0 206a65dc 86f2bb6b bdf1a2bc 96bc6d06
|
|
|
|
7f8237c2 0964b67f bccf8a93 332528fa 11e5ab43 2a6226a6 ceb197ab 7f03c061
|
2019-05-05 23:06:48 +00:00
|
|
|
$ bash install.sh
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -k echo ::: A B C > abc-file
|
|
|
|
parallel -k echo ::: D E F > def-file
|
|
|
|
perl -e 'printf "A\0B\0C\0"' > abc0-file
|
|
|
|
perl -e 'printf "A_B_C_"' > abc_-file
|
|
|
|
perl -e 'printf "f1\tf2\nA\tB\nC\tD\n"' > tsv-file.tsv
|
|
|
|
perl -e 'for(1..8){print "$_\n"}' > num8
|
|
|
|
perl -e 'for(1..30000){print "$_\n"}' > num30000
|
|
|
|
perl -e 'for(1..1000000){print "$_\n"}' > num1000000
|
2017-04-01 00:59:07 +00:00
|
|
|
(echo %head1; echo %head2; \
|
2015-04-09 23:20:51 +00:00
|
|
|
sleep .3
|
2017-04-01 00:59:07 +00:00
|
|
|
perl -e 'for(1..10){print "$_\n"}') > num_%header
|
|
|
|
perl -e 'print "HHHHAAABBBCCC"' > fixedlen
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel echo ::: A B C
|
|
|
|
parallel -a abc-file echo
|
|
|
|
cat abc-file | parallel echo
|
|
|
|
parallel echo ::: A B C ::: D E F
|
2015-04-04 14:37:32 +00:00
|
|
|
A D
|
|
|
|
A E
|
|
|
|
A F
|
|
|
|
B D
|
|
|
|
B E
|
|
|
|
B F
|
|
|
|
C D
|
|
|
|
C E
|
|
|
|
C F
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -a abc-file -a def-file echo
|
2015-04-04 14:37:32 +00:00
|
|
|
A D
|
|
|
|
A E
|
|
|
|
A F
|
|
|
|
B D
|
|
|
|
B E
|
|
|
|
B F
|
|
|
|
C D
|
|
|
|
C E
|
|
|
|
C F
|
2016-03-20 22:57:25 +00:00
|
|
|
cat abc-file | parallel -a - -a def-file echo
|
2015-04-04 14:37:32 +00:00
|
|
|
A D
|
|
|
|
A E
|
|
|
|
A F
|
|
|
|
B D
|
|
|
|
B E
|
|
|
|
B F
|
|
|
|
C D
|
|
|
|
C E
|
|
|
|
C F
|
2015-04-09 23:20:51 +00:00
|
|
|
cat abc-file | parallel echo :::: - def-file
|
2015-04-04 14:37:32 +00:00
|
|
|
A D
|
|
|
|
A E
|
|
|
|
A F
|
|
|
|
B D
|
|
|
|
B E
|
|
|
|
B F
|
|
|
|
C D
|
|
|
|
C E
|
|
|
|
C F
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel echo ::: A B C :::: def-file
|
2015-04-04 14:37:32 +00:00
|
|
|
A D
|
|
|
|
A E
|
|
|
|
A F
|
|
|
|
B D
|
|
|
|
B E
|
|
|
|
B F
|
|
|
|
C D
|
|
|
|
C E
|
|
|
|
C F
|
2016-08-13 17:11:15 +00:00
|
|
|
parallel --link echo ::: A B C ::: D E F
|
2015-04-04 14:37:32 +00:00
|
|
|
A D
|
|
|
|
B E
|
|
|
|
C F
|
2016-08-13 17:11:15 +00:00
|
|
|
parallel --link echo ::: A B C D E ::: F G
|
2015-04-04 14:37:32 +00:00
|
|
|
A F
|
|
|
|
B G
|
|
|
|
C F
|
|
|
|
D G
|
|
|
|
E F
|
2016-08-13 17:11:15 +00:00
|
|
|
parallel echo :::: abc-file :::+ G H I :::: def-file
|
|
|
|
A G D
|
|
|
|
A G E
|
|
|
|
A G F
|
|
|
|
B H D
|
|
|
|
B H E
|
|
|
|
B H F
|
|
|
|
C I D
|
|
|
|
C I E
|
|
|
|
C I F
|
|
|
|
parallel echo :::: abc-file ::: G H I ::::+ def-file
|
|
|
|
A G D
|
|
|
|
A H E
|
|
|
|
A I F
|
|
|
|
B G D
|
|
|
|
B H E
|
|
|
|
B I F
|
|
|
|
C G D
|
|
|
|
C H E
|
|
|
|
C I F
|
|
|
|
parallel echo ::: A B C D E :::+ F G
|
|
|
|
A F
|
|
|
|
B G
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --arg-sep ,, echo ,, A B C :::: def-file
|
2015-04-04 14:37:32 +00:00
|
|
|
A D
|
|
|
|
A E
|
|
|
|
A F
|
|
|
|
B D
|
|
|
|
B E
|
|
|
|
B F
|
|
|
|
C D
|
|
|
|
C E
|
|
|
|
C F
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --arg-file-sep // echo ::: A B C // def-file
|
2015-04-04 14:37:32 +00:00
|
|
|
A D
|
|
|
|
A E
|
|
|
|
A F
|
|
|
|
B D
|
|
|
|
B E
|
|
|
|
B F
|
|
|
|
C D
|
|
|
|
C E
|
|
|
|
C F
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -d _ echo :::: abc_-file
|
|
|
|
parallel -d '\0' echo :::: abc0-file
|
|
|
|
parallel -E stop echo ::: A B stop C D
|
|
|
|
(echo 1; echo; echo 2) | parallel --no-run-if-empty echo
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel ::: ls 'echo foo' pwd
|
2019-09-22 05:30:08 +00:00
|
|
|
abc-file
|
2015-04-04 14:37:32 +00:00
|
|
|
abc0-file
|
|
|
|
abc_-file
|
|
|
|
def-file
|
2017-04-01 00:59:07 +00:00
|
|
|
fixedlen
|
2015-04-04 14:37:32 +00:00
|
|
|
num1000000
|
|
|
|
num30000
|
|
|
|
num8
|
2023-02-19 13:49:30 +00:00
|
|
|
outdir
|
2015-04-04 14:37:32 +00:00
|
|
|
tsv-file.tsv
|
|
|
|
foo
|
2023-02-19 13:49:30 +00:00
|
|
|
/TMP
|
2015-04-09 23:20:51 +00:00
|
|
|
my_func() {
|
|
|
|
echo in my_func $1
|
|
|
|
}
|
|
|
|
export -f my_func
|
|
|
|
parallel my_func ::: 1 2 3
|
2015-04-04 14:37:32 +00:00
|
|
|
in my_func 1
|
|
|
|
in my_func 2
|
|
|
|
in my_func 3
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel echo ::: A/B.C
|
2015-04-04 14:37:32 +00:00
|
|
|
A/B.C
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel echo {} ::: A/B.C
|
2015-04-04 14:37:32 +00:00
|
|
|
A/B.C
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel echo {.} ::: A/B.C
|
2015-04-04 14:37:32 +00:00
|
|
|
A/B
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel echo {/} ::: A/B.C
|
2015-04-04 14:37:32 +00:00
|
|
|
B.C
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel echo {//} ::: A/B.C
|
|
|
|
parallel echo {/.} ::: A/B.C
|
|
|
|
parallel echo {#} ::: A B C
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -j 2 echo {%} ::: A B C
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -I ,, echo ,, ::: A/B.C
|
2015-04-04 14:37:32 +00:00
|
|
|
A/B.C
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --extensionreplace ,, echo ,, ::: A/B.C
|
2015-04-04 14:37:32 +00:00
|
|
|
A/B
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --basenamereplace ,, echo ,, ::: A/B.C
|
2015-04-04 14:37:32 +00:00
|
|
|
B.C
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --dirnamereplace ,, echo ,, ::: A/B.C
|
|
|
|
parallel --basenameextensionreplace ,, echo ,, ::: A/B.C
|
|
|
|
parallel --seqreplace ,, echo ,, ::: A B C
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -j2 --slotreplace ,, echo ,, ::: A B C
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel echo '{= s:\.[^.]+$::;s:\.[^.]+$::; =}' ::: foo.tar.gz
|
2015-04-04 14:37:32 +00:00
|
|
|
foo
|
2016-01-23 08:54:05 +00:00
|
|
|
parallel echo Job {#} of {= '$_=total_jobs()' =} ::: {1..5}
|
|
|
|
Job 1 of 5
|
|
|
|
Job 2 of 5
|
|
|
|
Job 3 of 5
|
|
|
|
Job 4 of 5
|
|
|
|
Job 5 of 5
|
|
|
|
parallel echo {} shell quoted is {= '$_=Q($_)' =} ::: '*/!#$'
|
2018-08-22 22:21:29 +00:00
|
|
|
*/!#$ shell quoted is '*/!#$'
|
2016-11-21 21:35:25 +00:00
|
|
|
parallel echo {= 'if($_==3) { skip() }' =} ::: {1..5}
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel echo {= 'if($arg[1]==$arg[2]) { skip() }' =} \
|
|
|
|
::: {1..3} ::: {1..3}
|
2016-01-23 08:54:05 +00:00
|
|
|
1 2
|
|
|
|
1 3
|
|
|
|
2 1
|
|
|
|
2 3
|
|
|
|
3 1
|
|
|
|
3 2
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel --parens ,,,, echo ',, s:\.[^.]+$::;s:\.[^.]+$::; ,,' \
|
|
|
|
::: foo.tar.gz
|
2015-04-04 14:37:32 +00:00
|
|
|
foo
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel --rpl '.. s:\.[^.]+$::;s:\.[^.]+$::;' echo '..' \
|
|
|
|
::: foo.tar.gz
|
2015-04-04 14:37:32 +00:00
|
|
|
foo
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel --rpl '{..} s:\.[^.]+$::;s:\.[^.]+$::;' echo '{..}'
|
|
|
|
::: foo.tar.gz
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 2: :::: command not found
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel --rpl '{%(.+?)} s/$$1$//;' echo {%.tar.gz}.zip ::: foo.tar.gz
|
|
|
|
foo.zip
|
|
|
|
parallel --rpl '{/(.+?)/(.*?)} s/$$1/$$2/;' echo {/tar.gz/zip} \
|
|
|
|
::: foo.tar.gz
|
|
|
|
foo.zip
|
2015-04-09 23:20:51 +00:00
|
|
|
--rpl '{} '
|
|
|
|
--rpl '{#} $_=$job->seq()'
|
|
|
|
--rpl '{%} $_=$job->slot()'
|
|
|
|
--rpl '{/} s:.*/::'
|
2017-04-01 00:59:07 +00:00
|
|
|
--rpl '{//} $Global::use{"File::Basename"} ||=
|
|
|
|
eval "use File::Basename; 1;"; $_ = dirname($_);'
|
2015-04-09 23:20:51 +00:00
|
|
|
--rpl '{/.} s:.*/::; s:\.[^/.]+$::;'
|
|
|
|
--rpl '{.} s:\.[^/.]+$::'
|
2020-07-22 20:45:09 +00:00
|
|
|
/usr/bin/bash: line 1: --rpl: command not found
|
|
|
|
/usr/bin/bash: line 2: --rpl: command not found
|
|
|
|
/usr/bin/bash: line 3: --rpl: command not found
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 4: --rpl: command not found
|
2020-07-22 20:45:09 +00:00
|
|
|
/usr/bin/bash: line 6: --rpl: command not found
|
|
|
|
/usr/bin/bash: line 7: --rpl: command not found
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 8: --rpl: command not found
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel echo {1} and {2} ::: A B ::: C D
|
2015-04-04 14:37:32 +00:00
|
|
|
A and C
|
|
|
|
A and D
|
|
|
|
B and C
|
|
|
|
B and D
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel echo /={1/} //={1//} /.={1/.} .={1.} ::: A/B.C D/E.F
|
2015-04-04 14:37:32 +00:00
|
|
|
/=B.C //=A /.=B .=A/B
|
|
|
|
/=E.F //=D /.=E .=D/E
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel echo 1={1} 2={2} 3={3} -1={-1} -2={-2} -3={-3} \
|
|
|
|
::: A B ::: C D ::: E F
|
2015-04-04 14:37:32 +00:00
|
|
|
1=A 2=C 3=E -1=E -2=C -3=A
|
|
|
|
1=A 2=C 3=F -1=F -2=C -3=A
|
|
|
|
1=A 2=D 3=E -1=E -2=D -3=A
|
|
|
|
1=A 2=D 3=F -1=F -2=D -3=A
|
|
|
|
1=B 2=C 3=E -1=E -2=C -3=B
|
|
|
|
1=B 2=C 3=F -1=F -2=C -3=B
|
|
|
|
1=B 2=D 3=E -1=E -2=D -3=B
|
|
|
|
1=B 2=D 3=F -1=F -2=D -3=B
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel echo '{=2 s:\.[^.]+$::;s:\.[^.]+$::; =} {1}' \
|
|
|
|
::: bar ::: foo.tar.gz
|
2015-04-04 14:37:32 +00:00
|
|
|
foo bar
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel --rpl '{..} s:\.[^.]+$::;s:\.[^.]+$::;' echo '{2..} {1}' \
|
|
|
|
::: bar ::: foo.tar.gz
|
2015-04-04 14:37:32 +00:00
|
|
|
foo bar
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --colsep '\t' echo 1={1} 2={2} :::: tsv-file.tsv
|
2015-04-04 14:37:32 +00:00
|
|
|
1=f1 2=f2
|
|
|
|
1=A 2=B
|
|
|
|
1=C 2=D
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --header : echo f1={f1} f2={f2} ::: f1 A B ::: f2 C D
|
2015-04-04 14:37:32 +00:00
|
|
|
f1=A f2=C
|
|
|
|
f1=A f2=D
|
|
|
|
f1=B f2=C
|
|
|
|
f1=B f2=D
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel --header : --colsep '\t' echo f1={f1} f2={f2} \
|
|
|
|
:::: tsv-file.tsv
|
2015-04-04 14:37:32 +00:00
|
|
|
f1=A f2=B
|
|
|
|
f1=C f2=D
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel --plus echo {} ::: dir/sub/file.ex1.ex2.ex3
|
|
|
|
parallel --plus echo {+/}/{/} ::: dir/sub/file.ex1.ex2.ex3
|
|
|
|
parallel --plus echo {.}.{+.} ::: dir/sub/file.ex1.ex2.ex3
|
|
|
|
parallel --plus echo {+/}/{/.}.{+.} ::: dir/sub/file.ex1.ex2.ex3
|
|
|
|
parallel --plus echo {..}.{+..} ::: dir/sub/file.ex1.ex2.ex3
|
|
|
|
parallel --plus echo {+/}/{/..}.{+..} ::: dir/sub/file.ex1.ex2.ex3
|
|
|
|
parallel --plus echo {...}.{+...} ::: dir/sub/file.ex1.ex2.ex3
|
|
|
|
parallel --plus echo {+/}/{/...}.{+...} ::: dir/sub/file.ex1.ex2.ex3
|
|
|
|
dir/sub/file.ex1.ex2.ex3
|
2016-01-23 08:54:05 +00:00
|
|
|
parallel --plus echo Job {#} of {##} ::: {1..5}
|
|
|
|
Job 1 of 5
|
|
|
|
Job 2 of 5
|
|
|
|
Job 3 of 5
|
|
|
|
Job 4 of 5
|
|
|
|
Job 5 of 5
|
2017-04-01 00:59:07 +00:00
|
|
|
unset myvar
|
|
|
|
echo ${myvar:-myval}
|
|
|
|
parallel --plus echo {:-myval} ::: "$myvar"
|
|
|
|
myval
|
|
|
|
myvar=abcAaAdef
|
|
|
|
echo ${myvar:2}
|
|
|
|
parallel --plus echo {:2} ::: "$myvar"
|
|
|
|
cAaAdef
|
|
|
|
echo ${myvar:2:3}
|
|
|
|
parallel --plus echo {:2:3} ::: "$myvar"
|
|
|
|
echo ${myvar#bc}
|
|
|
|
parallel --plus echo {#bc} ::: "$myvar"
|
|
|
|
echo ${myvar#abc}
|
|
|
|
parallel --plus echo {#abc} ::: "$myvar"
|
|
|
|
echo ${myvar%de}
|
|
|
|
parallel --plus echo {%de} ::: "$myvar"
|
|
|
|
echo ${myvar%def}
|
|
|
|
parallel --plus echo {%def} ::: "$myvar"
|
|
|
|
echo ${myvar/def/ghi}
|
|
|
|
parallel --plus echo {/def/ghi} ::: "$myvar"
|
|
|
|
echo ${myvar^a}
|
|
|
|
parallel --plus echo {^a} ::: "$myvar"
|
|
|
|
echo ${myvar^^a}
|
|
|
|
parallel --plus echo {^^a} ::: "$myvar"
|
|
|
|
myvar=AbcAaAdef
|
|
|
|
echo ${myvar,A}
|
|
|
|
parallel --plus echo '{,A}' ::: "$myvar"
|
|
|
|
echo ${myvar,,A}
|
|
|
|
parallel --plus echo '{,,A}' ::: "$myvar"
|
|
|
|
abcAaAdef
|
|
|
|
abcaaadef
|
2015-04-09 23:20:51 +00:00
|
|
|
cat num30000 | parallel --xargs echo | wc -l
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-04-09 23:20:51 +00:00
|
|
|
cat num30000 | parallel --xargs -s 10000 echo | wc -l
|
2016-05-17 00:11:38 +00:00
|
|
|
99
|
2015-04-09 23:20:51 +00:00
|
|
|
cat num30000 | parallel --jobs 4 -m echo | wc -l
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --jobs 4 -m echo ::: 1 2 3 4 5 6 7 8 9 10
|
2015-04-04 14:37:32 +00:00
|
|
|
1 2 3
|
|
|
|
4 5 6
|
|
|
|
7 8 9
|
2016-05-17 00:11:38 +00:00
|
|
|
99
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --jobs 4 -X echo pre-{}-post ::: A B C D E F G
|
2015-04-04 14:37:32 +00:00
|
|
|
pre-A-post pre-B-post
|
|
|
|
pre-C-post pre-D-post
|
|
|
|
pre-E-post pre-F-post
|
|
|
|
pre-G-post
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -N3 echo ::: A B C D E F G H
|
2015-04-04 14:37:32 +00:00
|
|
|
A B C
|
|
|
|
D E F
|
|
|
|
G H
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -N3 echo 1={1} 2={2} 3={3} ::: A B C D E F G H
|
2015-04-04 14:37:32 +00:00
|
|
|
1=A 2=B 3=C
|
|
|
|
1=D 2=E 3=F
|
|
|
|
1=G 2=H 3=
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -N0 echo foo ::: 1 2 3
|
2015-04-04 14:37:32 +00:00
|
|
|
foo
|
2015-04-09 23:20:51 +00:00
|
|
|
perl -e 'print "@ARGV\n"' A
|
|
|
|
parallel perl -e 'print "@ARGV\n"' ::: This wont work
|
2017-04-01 00:59:07 +00:00
|
|
|
Warning: Input is read from the terminal. You either know what you
|
|
|
|
Warning: are doing (in which case: YOU ARE AWESOME!) or you forgot
|
|
|
|
Warning: ::: or :::: or to pipe data into parallel. If so
|
|
|
|
Warning: Press CTRL-D to exit.
|
2015-04-09 23:20:51 +00:00
|
|
|
perl -e 'print "@ARGV\n"'
|
|
|
|
[CTRL-D]
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 2: Warning:: command not found
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --trim r echo pre-{}-post ::: ' A '
|
2015-04-04 14:37:32 +00:00
|
|
|
pre- A-post
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --trim l echo pre-{}-post ::: ' A '
|
2015-04-04 14:37:32 +00:00
|
|
|
pre-A -post
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --trim lr echo pre-{}-post ::: ' A '
|
2015-04-04 14:37:32 +00:00
|
|
|
pre-A-post
|
2016-09-22 22:57:30 +00:00
|
|
|
parallel echo \={} ::: zsh bash ls
|
|
|
|
=zsh
|
|
|
|
=bash
|
|
|
|
=ls
|
|
|
|
parallel 'set a="{}"; if( { test -d "$a" } ) echo "$a is a dir"' ::: *
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --tag echo foo-{} ::: A B C
|
2015-04-04 14:37:32 +00:00
|
|
|
A foo-A
|
|
|
|
B foo-B
|
|
|
|
C foo-C
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --tagstring {}-bar echo foo-{} ::: A B C
|
2015-04-04 14:37:32 +00:00
|
|
|
A-bar foo-A
|
|
|
|
B-bar foo-B
|
|
|
|
C-bar foo-C
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --dryrun echo {} ::: A B C
|
2015-04-04 14:37:32 +00:00
|
|
|
echo A
|
|
|
|
echo B
|
|
|
|
echo C
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --verbose echo {} ::: A B C
|
|
|
|
echo A
|
|
|
|
echo B
|
|
|
|
echo C
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel -j2 'printf "%s-start\n%s" {} {};
|
|
|
|
sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
|
2015-04-04 14:37:32 +00:00
|
|
|
4-start
|
|
|
|
2-start
|
|
|
|
2-middle
|
|
|
|
2-end
|
|
|
|
1-start
|
|
|
|
1-middle
|
|
|
|
1-end
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel -j2 --ungroup 'printf "%s-start\n%s" {} {};
|
|
|
|
sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
|
2015-04-04 14:37:32 +00:00
|
|
|
4-start
|
|
|
|
42-start
|
|
|
|
2-middle
|
|
|
|
2-end
|
|
|
|
1-start
|
|
|
|
1-middle
|
|
|
|
1-end
|
|
|
|
-middle
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel -j2 --linebuffer 'printf "%s-start\n%s" {} {};
|
|
|
|
sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
|
2015-04-04 14:37:32 +00:00
|
|
|
4-start
|
|
|
|
2-start
|
|
|
|
2-middle
|
|
|
|
2-end
|
|
|
|
1-start
|
|
|
|
1-middle
|
|
|
|
1-end
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel -j2 -k 'printf "%s-start\n%s" {} {};
|
|
|
|
sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
|
2015-04-04 14:37:32 +00:00
|
|
|
4-start
|
|
|
|
2-start
|
|
|
|
2-middle
|
|
|
|
2-end
|
|
|
|
1-start
|
|
|
|
1-middle
|
|
|
|
1-end
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --files echo ::: A B C
|
2023-02-19 13:49:30 +00:00
|
|
|
/TMP/tempfile
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --tmpdir /var/tmp --files echo ::: A B C
|
2023-01-30 21:51:56 +00:00
|
|
|
/var/tmp/tempfile
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --results outdir echo ::: A B C
|
2016-01-23 08:54:05 +00:00
|
|
|
outdir/1/A/seq
|
2015-04-09 23:20:51 +00:00
|
|
|
outdir/1/A/stderr
|
|
|
|
outdir/1/A/stdout
|
2016-01-23 08:54:05 +00:00
|
|
|
outdir/1/B/seq
|
2015-04-09 23:20:51 +00:00
|
|
|
outdir/1/B/stderr
|
|
|
|
outdir/1/B/stdout
|
2016-01-23 08:54:05 +00:00
|
|
|
outdir/1/C/seq
|
2015-04-09 23:20:51 +00:00
|
|
|
outdir/1/C/stderr
|
|
|
|
outdir/1/C/stdout
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 1: outdir/1/A/seq: No such file or directory
|
|
|
|
/usr/bin/bash: line 2: outdir/1/A/stderr: No such file or directory
|
|
|
|
/usr/bin/bash: line 3: outdir/1/A/stdout: No such file or directory
|
|
|
|
/usr/bin/bash: line 4: outdir/1/B/seq: No such file or directory
|
|
|
|
/usr/bin/bash: line 5: outdir/1/B/stderr: No such file or directory
|
|
|
|
/usr/bin/bash: line 6: outdir/1/B/stdout: No such file or directory
|
|
|
|
/usr/bin/bash: line 7: outdir/1/C/seq: No such file or directory
|
|
|
|
/usr/bin/bash: line 8: outdir/1/C/stderr: No such file or directory
|
|
|
|
/usr/bin/bash: line 9: outdir/1/C/stdout: No such file or directory
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --header : --results outdir echo ::: f1 A B ::: f2 C D
|
2016-01-23 08:54:05 +00:00
|
|
|
outdir/f1/A/f2/C/seq
|
2015-04-09 23:20:51 +00:00
|
|
|
outdir/f1/A/f2/C/stderr
|
|
|
|
outdir/f1/A/f2/C/stdout
|
2016-01-23 08:54:05 +00:00
|
|
|
outdir/f1/A/f2/D/seq
|
2015-04-09 23:20:51 +00:00
|
|
|
outdir/f1/A/f2/D/stderr
|
|
|
|
outdir/f1/A/f2/D/stdout
|
2016-01-23 08:54:05 +00:00
|
|
|
outdir/f1/B/f2/C/seq
|
2015-04-09 23:20:51 +00:00
|
|
|
outdir/f1/B/f2/C/stderr
|
|
|
|
outdir/f1/B/f2/C/stdout
|
2016-01-23 08:54:05 +00:00
|
|
|
outdir/f1/B/f2/D/seq
|
2015-04-09 23:20:51 +00:00
|
|
|
outdir/f1/B/f2/D/stderr
|
|
|
|
outdir/f1/B/f2/D/stdout
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 1: outdir/f1/A/f2/C/seq: No such file or directory
|
|
|
|
/usr/bin/bash: line 2: outdir/f1/A/f2/C/stderr: No such file or directory
|
|
|
|
/usr/bin/bash: line 3: outdir/f1/A/f2/C/stdout: No such file or directory
|
|
|
|
/usr/bin/bash: line 4: outdir/f1/A/f2/D/seq: No such file or directory
|
|
|
|
/usr/bin/bash: line 5: outdir/f1/A/f2/D/stderr: No such file or directory
|
|
|
|
/usr/bin/bash: line 6: outdir/f1/A/f2/D/stdout: No such file or directory
|
|
|
|
/usr/bin/bash: line 7: outdir/f1/B/f2/C/seq: No such file or directory
|
|
|
|
/usr/bin/bash: line 8: outdir/f1/B/f2/C/stderr: No such file or directory
|
|
|
|
/usr/bin/bash: line 9: outdir/f1/B/f2/C/stdout: No such file or directory
|
|
|
|
/usr/bin/bash: line 10: outdir/f1/B/f2/D/seq: No such file or directory
|
|
|
|
/usr/bin/bash: line 11: outdir/f1/B/f2/D/stderr: No such file or directory
|
|
|
|
/usr/bin/bash: line 12: outdir/f1/B/f2/D/stdout: No such file or directory
|
2015-04-09 23:20:51 +00:00
|
|
|
echo 50% > my_jobs
|
|
|
|
sleep 1
|
|
|
|
echo 0 > my_jobs
|
|
|
|
wait
|
|
|
|
parallel --use-cpus-instead-of-cores -N0 sleep 1 :::: num8
|
2015-05-21 21:02:55 +00:00
|
|
|
parallel --shuf echo ::: 1 2 3 ::: a b c ::: A B C
|
|
|
|
123 abc ABC
|
|
|
|
tmux -S /tmp/tmsXXXXX attach
|
2018-05-22 23:07:40 +00:00
|
|
|
no sessions
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --delay 2.5 echo Starting {}\;date ::: 1 2 3
|
2015-04-04 14:37:32 +00:00
|
|
|
Starting 1
|
|
|
|
DATE OUTPUT
|
|
|
|
Starting 2
|
|
|
|
DATE OUTPUT
|
|
|
|
Starting 3
|
|
|
|
DATE OUTPUT
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --timeout 4.1 sleep {}\; echo {} ::: 2 4 6 8
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2018-05-22 23:07:40 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
|
|
|
parallel: Warning: sleep 6; echo 6
|
|
|
|
parallel: Warning: This job was killed because it timed out:
|
|
|
|
parallel: Warning: sleep 8; echo 8
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --timeout 200% sleep {}\; echo {} ::: 2.1 2.2 3 7 2.3
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2018-05-22 23:07:40 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
|
|
|
parallel: Warning: sleep 7; echo 7
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --eta sleep ::: 1 3 2 2 1 3 3 2 1
|
2023-12-13 00:02:19 +00:00
|
|
|
Computers / CPU threads / Max jobs to run
|
2023-07-21 02:33:22 +00:00
|
|
|
1:local / 9 / 9
|
2015-04-04 14:37:32 +00:00
|
|
|
Computer:jobs running/jobs completed/%of started jobs/Average seconds to complete
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --progress sleep ::: 1 3 2 2 1 3 3 2 1
|
2023-12-13 00:02:19 +00:00
|
|
|
Computers / CPU threads / Max jobs to run
|
2023-07-21 02:33:22 +00:00
|
|
|
1:local / 9 / 9
|
2015-04-04 14:37:32 +00:00
|
|
|
Computer:jobs running/jobs completed/%of started jobs/Average seconds to complete
|
2017-04-01 00:59:07 +00:00
|
|
|
seq 1000 | parallel -j10 --bar '(echo -n {};sleep 0.1)' \
|
2020-08-07 20:20:30 +00:00
|
|
|
2> >(perl -pe 'BEGIN{$/="\r";$|=1};s/\r/\n/g' |
|
|
|
|
zenity --timeout=15 --progress --auto-kill --auto-close)
|
2024-01-21 06:53:12 +00:00
|
|
|
parallel --joblog /tmp/log exit ::: 1 2 3 0
|
2015-04-14 22:55:09 +00:00
|
|
|
cat /tmp/log;
|
2016-03-20 22:57:25 +00:00
|
|
|
parallel --joblog /tmp/log exit ::: 1 2 3 0
|
2015-04-14 22:55:09 +00:00
|
|
|
cat /tmp/log; parallel --resume --joblog /tmp/log exit ::: 1 2 3 0 0 0
|
|
|
|
cat /tmp/log;
|
|
|
|
parallel --resume-failed --joblog /tmp/log exit ::: 1 2 3 0 0 0
|
|
|
|
cat /tmp/log;
|
2016-08-13 17:11:15 +00:00
|
|
|
parallel --retry-failed --joblog /tmp/log
|
2016-01-23 08:54:05 +00:00
|
|
|
cat /tmp/log;
|
2015-05-21 21:02:55 +00:00
|
|
|
parallel -j2 --halt soon,fail=1 echo {}\; exit {} ::: 0 0 1 2 3
|
2015-04-04 14:37:32 +00:00
|
|
|
Seq Host Starttime JobRuntime Send Receive Exitval Signal Command
|
|
|
|
1 : TIMESTAMP 9.999 0 0 1 0 exit 1
|
|
|
|
2 : TIMESTAMP 9.999 0 0 2 0 exit 2
|
|
|
|
3 : TIMESTAMP 9.999 0 0 3 0 exit 3
|
|
|
|
4 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
Seq Host Starttime JobRuntime Send Receive Exitval Signal Command
|
|
|
|
1 : TIMESTAMP 9.999 0 0 1 0 exit 1
|
|
|
|
2 : TIMESTAMP 9.999 0 0 2 0 exit 2
|
|
|
|
3 : TIMESTAMP 9.999 0 0 3 0 exit 3
|
|
|
|
4 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
Seq Host Starttime JobRuntime Send Receive Exitval Signal Command
|
|
|
|
1 : TIMESTAMP 9.999 0 0 1 0 exit 1
|
|
|
|
2 : TIMESTAMP 9.999 0 0 2 0 exit 2
|
|
|
|
3 : TIMESTAMP 9.999 0 0 3 0 exit 3
|
|
|
|
4 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
5 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
6 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
Seq Host Starttime JobRuntime Send Receive Exitval Signal Command
|
|
|
|
1 : TIMESTAMP 9.999 0 0 1 0 exit 1
|
|
|
|
2 : TIMESTAMP 9.999 0 0 2 0 exit 2
|
|
|
|
3 : TIMESTAMP 9.999 0 0 3 0 exit 3
|
|
|
|
4 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
5 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
6 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
1 : TIMESTAMP 9.999 0 0 1 0 exit 1
|
|
|
|
2 : TIMESTAMP 9.999 0 0 2 0 exit 2
|
|
|
|
3 : TIMESTAMP 9.999 0 0 3 0 exit 3
|
2016-01-23 08:54:05 +00:00
|
|
|
Seq Host Starttime JobRuntime Send Receive Exitval Signal Command
|
|
|
|
1 : TIMESTAMP 9.999 0 0 1 0 exit 1
|
|
|
|
2 : TIMESTAMP 9.999 0 0 2 0 exit 2
|
|
|
|
3 : TIMESTAMP 9.999 0 0 3 0 exit 3
|
|
|
|
4 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
5 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
6 : TIMESTAMP 9.999 0 0 0 0 exit 0
|
|
|
|
1 : TIMESTAMP 9.999 0 0 1 0 exit 1
|
|
|
|
2 : TIMESTAMP 9.999 0 0 2 0 exit 2
|
|
|
|
3 : TIMESTAMP 9.999 0 0 3 0 exit 3
|
2016-08-13 17:11:15 +00:00
|
|
|
1 : TIMESTAMP 9.999 0 0 1 0 exit 1
|
|
|
|
2 : TIMESTAMP 9.999 0 0 2 0 exit 2
|
|
|
|
3 : TIMESTAMP 9.999 0 0 3 0 exit 3
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-05-21 21:02:55 +00:00
|
|
|
parallel -j2 --halt now,fail=1 echo {}\; exit {} ::: 0 0 1 2 3
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel -j2 --halt soon,fail=20% echo {}\; exit {} \
|
|
|
|
::: 0 1 2 3 4 5 6 7 8 9
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2016-01-23 08:54:05 +00:00
|
|
|
parallel -j2 --halt now,success=1 echo {}\; exit {} ::: 1 2 3 0 4 5 6
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-05-21 21:02:55 +00:00
|
|
|
parallel: This job succeeded:
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel -k --retries 3 \
|
|
|
|
'echo tried {} >>/tmp/runs; echo completed {}; exit {}' ::: 1 2 0
|
2015-04-09 23:20:51 +00:00
|
|
|
cat /tmp/runs
|
2015-04-04 14:37:32 +00:00
|
|
|
completed 1
|
|
|
|
completed 2
|
|
|
|
completed 0
|
|
|
|
tried 0
|
2016-01-23 08:54:05 +00:00
|
|
|
show_signals() {
|
2017-04-01 00:59:07 +00:00
|
|
|
perl -e 'for(keys %SIG) {
|
|
|
|
$SIG{$_} = eval "sub { print \"Got $_\\n\"; }";
|
|
|
|
}
|
|
|
|
while(1){sleep 1}'
|
2016-01-23 08:54:05 +00:00
|
|
|
}
|
|
|
|
export -f show_signals
|
2017-04-01 00:59:07 +00:00
|
|
|
echo | parallel --termseq TERM,200,TERM,100,TERM,50,KILL,25 \
|
|
|
|
-u --timeout 1 show_signals
|
2018-05-22 23:07:40 +00:00
|
|
|
parallel: Warning: This job was killed because it timed out:
|
|
|
|
parallel: Warning: show_signals ''
|
2017-04-01 00:59:07 +00:00
|
|
|
echo | parallel --termseq INT,200,TERM,100,KILL,25 \
|
|
|
|
-u --timeout 1 show_signals
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 1: show_signals: command not found
|
2016-03-20 22:57:25 +00:00
|
|
|
parallel --load 100% echo load is less than {} job per cpu ::: 1
|
2015-04-04 14:37:32 +00:00
|
|
|
load is less than 1 job per cpu
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --noswap echo the system is not swapping ::: now
|
2015-04-04 14:37:32 +00:00
|
|
|
the system is not swapping now
|
2016-01-23 08:54:05 +00:00
|
|
|
parallel --memfree 1G echo will run if more than 1 GB is ::: free
|
|
|
|
will run if more than 1 GB is free
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --nice 17 echo this is being run with nice -n ::: 17
|
2015-04-04 14:37:32 +00:00
|
|
|
this is being run with nice -n 17
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -S $SERVER1 echo running on ::: $SERVER1
|
2015-04-04 14:37:32 +00:00
|
|
|
running on parallel@lo
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -S $SERVER1 echo running on ::: username@$SERVER1
|
2015-04-04 14:37:32 +00:00
|
|
|
running on username@parallel@lo
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -S : echo running on ::: the_local_machine
|
2015-04-04 14:37:32 +00:00
|
|
|
running on the_local_machine
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -S '/usr/bin/ssh '$SERVER1 echo custom ::: ssh
|
2016-01-23 08:54:05 +00:00
|
|
|
custom ssh
|
|
|
|
parallel --ssh /usr/bin/ssh -S $SERVER1 echo custom ::: ssh
|
|
|
|
custom ssh
|
|
|
|
export PARALLEL_SSH=/usr/bin/ssh
|
|
|
|
parallel -S $SERVER1 echo custom ::: ssh
|
2015-04-04 14:37:32 +00:00
|
|
|
custom ssh
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -S $SERVER1 -S $SERVER2 echo ::: running on more hosts
|
2015-04-04 14:37:32 +00:00
|
|
|
running
|
|
|
|
on
|
|
|
|
more
|
|
|
|
hosts
|
2015-04-09 23:20:51 +00:00
|
|
|
echo $SERVER1 > nodefile
|
|
|
|
# Force 4 cores, special ssh-command, username
|
|
|
|
echo 4//usr/bin/ssh $SERVER2 >> nodefile
|
|
|
|
parallel --sshloginfile nodefile echo ::: running on more hosts
|
2015-04-04 14:37:32 +00:00
|
|
|
running
|
|
|
|
on
|
|
|
|
more
|
|
|
|
hosts
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -S 4/$SERVER1 echo force {} cpus on server ::: 4
|
2015-04-04 14:37:32 +00:00
|
|
|
force 4 cpus on server
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel --hostgroup -S @grp1/$SERVER1 -S @grp2/$SERVER2 echo {} \
|
|
|
|
::: run_on_grp1@grp1 run_on_grp2@grp2
|
2015-05-21 21:02:55 +00:00
|
|
|
run_on_grp1
|
|
|
|
run_on_grp2
|
2015-04-09 23:20:51 +00:00
|
|
|
echo This is input_file > input_file
|
2016-03-20 22:57:25 +00:00
|
|
|
parallel -S $SERVER1 --transferfile {} cat ::: input_file
|
2015-04-09 23:20:51 +00:00
|
|
|
echo This is input_file > input_file
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel -S $SERVER1 --transferfile {} --return {}.out \
|
|
|
|
cat {} ">"{}.out ::: input_file
|
2015-04-09 23:20:51 +00:00
|
|
|
cat input_file.out
|
|
|
|
echo This is input_file > input_file
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel -S $SERVER1 --transferfile {} --return {}.out --cleanup \
|
|
|
|
cat {} ">"{}.out ::: input_file
|
2015-04-09 23:20:51 +00:00
|
|
|
cat input_file.out
|
|
|
|
echo This is input_file > input_file
|
2016-03-20 22:57:25 +00:00
|
|
|
parallel -S $SERVER1 --trc {}.out cat {} ">"{}.out ::: input_file
|
2015-04-09 23:20:51 +00:00
|
|
|
cat input_file.out
|
|
|
|
echo common data > common_file
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel --basefile common_file -S $SERVER1 \
|
|
|
|
cat common_file\; echo {} ::: foo
|
2015-04-04 14:37:32 +00:00
|
|
|
common data
|
|
|
|
foo
|
2023-02-19 13:49:30 +00:00
|
|
|
parallel -S $SERVER1 pwd ::: "
|
|
|
|
parallel --workdir . -S $SERVER1 pwd ::: "
|
|
|
|
parallel --workdir ... -S $SERVER1 pwd ::: "
|
2020-07-22 20:45:09 +00:00
|
|
|
/home/parallel
|
2023-02-19 13:49:30 +00:00
|
|
|
/TMP
|
2020-07-22 20:45:09 +00:00
|
|
|
/home/parallel/.TMPWORKDIR
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel -S $SERVER1 --sshdelay 0.2 echo ::: 1 2 3
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --controlmaster -S $SERVER1 echo ::: 1 2 3
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --onall -S $SERVER1,$SERVER2 echo ::: foo bar
|
2015-04-04 14:37:32 +00:00
|
|
|
foo
|
|
|
|
bar
|
|
|
|
foo
|
|
|
|
bar
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --nonall --tag -S $SERVER1,$SERVER2 echo foo bar
|
2015-04-04 14:37:32 +00:00
|
|
|
csh@lo foo bar
|
|
|
|
parallel@lo foo bar
|
2016-03-26 09:35:13 +00:00
|
|
|
source `which env_parallel.bash`
|
|
|
|
alias myecho=echo
|
|
|
|
myvar="Joe's var is"
|
|
|
|
env_parallel -S $SERVER1 'myecho $myvar' ::: green
|
2016-07-22 16:10:28 +00:00
|
|
|
Unknown option: -S
|
|
|
|
Unknown option: parallel@lo
|
|
|
|
Unknown option: myecho $myvar
|
|
|
|
Unknown option: :::
|
|
|
|
Unknown option: green
|
2024-01-21 06:53:12 +00:00
|
|
|
You have called the dummy script "env_parallel".
|
2022-01-22 16:00:32 +00:00
|
|
|
env_parallel only works if it is a function.
|
2024-01-21 06:53:12 +00:00
|
|
|
You need to do this and restart your shell:
|
2023-04-22 18:47:04 +00:00
|
|
|
bash: Put this in $HOME/.bashrc: . env_parallel.bash
|
|
|
|
E.g. by doing: echo '. env_parallel.bash' >> $HOME/.bashrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2022-01-22 16:00:32 +00:00
|
|
|
fish: Put this in $HOME/.config/fish/config.fish: . (which env_parallel.fish)
|
2016-04-11 20:19:28 +00:00
|
|
|
E.g. by doing:
|
2018-05-22 23:07:40 +00:00
|
|
|
echo '. (which env_parallel.fish)' >> $HOME/.config/fish/config.fish
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2023-04-22 18:47:04 +00:00
|
|
|
ksh: Put this in $HOME/.kshrc: source env_parallel.ksh
|
|
|
|
E.g. by doing: echo 'source env_parallel.ksh' >> $HOME/.kshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2023-04-22 18:47:04 +00:00
|
|
|
mksh: Put this in $HOME/.mkshrc: source env_parallel.mksh
|
|
|
|
E.g. by doing: echo 'source env_parallel.mksh' >> $HOME/.mkshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2023-04-22 18:47:04 +00:00
|
|
|
pdksh: Put this in $HOME/.profile: source env_parallel.pdksh
|
|
|
|
E.g. by doing: echo '. env_parallel.pdksh' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2023-04-22 18:47:04 +00:00
|
|
|
zsh: Put this in $HOME/.zshrc: . env_parallel.zsh
|
|
|
|
E.g. by doing: echo '. env_parallel.zsh' >> $HOME/.zshenv
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, functions, arrays
|
2023-04-22 18:47:04 +00:00
|
|
|
ash: Put this in $HOME/.profile: . env_parallel.ash
|
|
|
|
E.g. by doing: echo '. env_parallel.ash' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases
|
2023-04-22 18:47:04 +00:00
|
|
|
dash: Put this in $HOME/.profile: . env_parallel.dash
|
|
|
|
E.g. by doing: echo '. env_parallel.dash' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases
|
2018-05-22 23:07:40 +00:00
|
|
|
csh: Put this in $HOME/.cshrc: source `which env_parallel.csh`
|
|
|
|
E.g. by doing: echo 'source `which env_parallel.csh`' >> $HOME/.cshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, arrays with no special chars
|
2018-05-22 23:07:40 +00:00
|
|
|
tcsh: Put this in $HOME/.tcshrc: source `which env_parallel.tcsh`
|
|
|
|
E.g. by doing: echo 'source `which env_parallel.tcsh`' >> $HOME/.tcshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, arrays with no special chars
|
2016-07-22 16:10:28 +00:00
|
|
|
To install in all shells run:
|
|
|
|
env_parallel --install
|
2022-05-13 23:27:17 +00:00
|
|
|
In a script you need to run this before using env_parallel:
|
2023-04-22 18:47:04 +00:00
|
|
|
bash: . env_parallel.bash
|
|
|
|
ksh: source env_parallel.ksh
|
|
|
|
mksh: source env_parallel.mksh
|
|
|
|
pdksh: source env_parallel.pdksh
|
|
|
|
zsh: . env_parallel.zsh
|
|
|
|
ash: . env_parallel.ash
|
|
|
|
dash: . env_parallel.dash
|
2016-04-11 20:19:28 +00:00
|
|
|
For details: see man env_parallel
|
2015-04-09 23:20:51 +00:00
|
|
|
MYVAR='foo bar'
|
|
|
|
export MYVAR
|
|
|
|
parallel --env MYVAR -S $SERVER1 echo '$MYVAR' ::: baz
|
2015-04-04 14:37:32 +00:00
|
|
|
foo bar baz
|
2015-04-09 23:20:51 +00:00
|
|
|
my_func() {
|
|
|
|
echo in my_func $1
|
|
|
|
}
|
|
|
|
export -f my_func
|
|
|
|
parallel --env my_func -S $SERVER1 my_func ::: baz
|
2015-04-04 14:37:32 +00:00
|
|
|
in my_func baz
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --record-env
|
|
|
|
cat ~/.parallel/ignored_vars|sort
|
2023-02-19 13:49:30 +00:00
|
|
|
BASH_FUNC_replace_tmpdir%%
|
2017-04-01 00:59:07 +00:00
|
|
|
BASH_FUNC_run_once%%
|
2015-04-09 23:20:51 +00:00
|
|
|
BASH_FUNC_run_test%%
|
2019-09-22 05:30:08 +00:00
|
|
|
_
|
2024-08-04 08:47:04 +00:00
|
|
|
mysqlrootpass
|
2023-02-19 13:49:30 +00:00
|
|
|
qTMPDIR
|
|
|
|
qqTMPDIR
|
2023-01-30 21:51:56 +00:00
|
|
|
testsuitedir
|
2022-01-22 16:00:32 +00:00
|
|
|
withpassword
|
2015-04-09 23:20:51 +00:00
|
|
|
# The function is only copied if using Bash
|
|
|
|
my_func2() {
|
|
|
|
echo in my_func2 $VAR $1
|
|
|
|
}
|
|
|
|
export -f my_func2
|
|
|
|
VAR=foo
|
|
|
|
export VAR
|
|
|
|
parallel --env _ -S $SERVER1 'echo $VAR; my_func2' ::: bar
|
2022-04-23 09:38:57 +00:00
|
|
|
script line 2: my_func2: command not found
|
2017-04-01 00:59:07 +00:00
|
|
|
NOT='not exported var'
|
|
|
|
alias myecho=echo
|
|
|
|
not_ex() {
|
|
|
|
myecho in not_exported_func $NOT $1
|
|
|
|
}
|
|
|
|
env_parallel --env _ -S $SERVER1 'echo $NOT; not_ex' ::: bar
|
|
|
|
Unknown option: --env
|
|
|
|
Unknown option: _
|
|
|
|
Unknown option: -S
|
|
|
|
Unknown option: parallel@lo
|
|
|
|
Unknown option: echo $NOT; not_ex
|
|
|
|
Unknown option: :::
|
|
|
|
Unknown option: bar
|
2024-01-21 06:53:12 +00:00
|
|
|
You have called the dummy script "env_parallel".
|
2022-01-22 16:00:32 +00:00
|
|
|
env_parallel only works if it is a function.
|
2024-01-21 06:53:12 +00:00
|
|
|
You need to do this and restart your shell:
|
2023-04-22 18:47:04 +00:00
|
|
|
bash: Put this in $HOME/.bashrc: . env_parallel.bash
|
|
|
|
E.g. by doing: echo '. env_parallel.bash' >> $HOME/.bashrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2022-01-22 16:00:32 +00:00
|
|
|
fish: Put this in $HOME/.config/fish/config.fish: . (which env_parallel.fish)
|
2017-04-01 00:59:07 +00:00
|
|
|
E.g. by doing:
|
2018-05-22 23:07:40 +00:00
|
|
|
echo '. (which env_parallel.fish)' >> $HOME/.config/fish/config.fish
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2023-04-22 18:47:04 +00:00
|
|
|
ksh: Put this in $HOME/.kshrc: source env_parallel.ksh
|
|
|
|
E.g. by doing: echo 'source env_parallel.ksh' >> $HOME/.kshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2023-04-22 18:47:04 +00:00
|
|
|
mksh: Put this in $HOME/.mkshrc: source env_parallel.mksh
|
|
|
|
E.g. by doing: echo 'source env_parallel.mksh' >> $HOME/.mkshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2023-04-22 18:47:04 +00:00
|
|
|
pdksh: Put this in $HOME/.profile: source env_parallel.pdksh
|
|
|
|
E.g. by doing: echo '. env_parallel.pdksh' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2023-04-22 18:47:04 +00:00
|
|
|
zsh: Put this in $HOME/.zshrc: . env_parallel.zsh
|
|
|
|
E.g. by doing: echo '. env_parallel.zsh' >> $HOME/.zshenv
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, functions, arrays
|
2023-04-22 18:47:04 +00:00
|
|
|
ash: Put this in $HOME/.profile: . env_parallel.ash
|
|
|
|
E.g. by doing: echo '. env_parallel.ash' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases
|
2023-04-22 18:47:04 +00:00
|
|
|
dash: Put this in $HOME/.profile: . env_parallel.dash
|
|
|
|
E.g. by doing: echo '. env_parallel.dash' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases
|
2018-05-22 23:07:40 +00:00
|
|
|
csh: Put this in $HOME/.cshrc: source `which env_parallel.csh`
|
|
|
|
E.g. by doing: echo 'source `which env_parallel.csh`' >> $HOME/.cshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, arrays with no special chars
|
2018-05-22 23:07:40 +00:00
|
|
|
tcsh: Put this in $HOME/.tcshrc: source `which env_parallel.tcsh`
|
|
|
|
E.g. by doing: echo 'source `which env_parallel.tcsh`' >> $HOME/.tcshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, arrays with no special chars
|
2017-04-01 00:59:07 +00:00
|
|
|
To install in all shells run:
|
|
|
|
env_parallel --install
|
2022-05-13 23:27:17 +00:00
|
|
|
In a script you need to run this before using env_parallel:
|
2023-04-22 18:47:04 +00:00
|
|
|
bash: . env_parallel.bash
|
|
|
|
ksh: source env_parallel.ksh
|
|
|
|
mksh: source env_parallel.mksh
|
|
|
|
pdksh: source env_parallel.pdksh
|
|
|
|
zsh: . env_parallel.zsh
|
|
|
|
ash: . env_parallel.ash
|
|
|
|
dash: . env_parallel.dash
|
2017-04-01 00:59:07 +00:00
|
|
|
For details: see man env_parallel
|
2016-05-25 22:13:48 +00:00
|
|
|
parallel -vv --pipepart --block 1M wc :::: num30000
|
2022-01-22 16:00:32 +00:00
|
|
|
<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)
|
2016-03-26 09:35:13 +00:00
|
|
|
30000 30000 168894
|
2015-04-09 23:20:51 +00:00
|
|
|
my_func3() {
|
|
|
|
echo in my_func $1 > $1.out
|
|
|
|
}
|
|
|
|
export -f my_func3
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel -vv --workdir ... --nice 17 --env _ --trc {}.out \
|
|
|
|
-S $SERVER1 my_func3 {} ::: abc-file
|
2023-03-22 19:32:12 +00:00
|
|
|
ssh -l parallel lo -- exec mkdir -p ./.TMPWORKDIR && rsync --protocol 30 --old-args -rlDzR -e'ssh -l parallel' ./abc-file lo:./.TMPWORKDIR;ssh -l parallel lo -- exec perl -X -e GNU_Parallel_worker,eval+pack+q/H10000000/,join+q//,@ARGV BASE64;_EXIT_status=$?; mkdir -p ./. && rsync --protocol 30 --old-args -rlDzR -e'ssh -l parallel' --rsync-path='cd ./.TMPWORKDIR/./.; rsync' -- lo:./abc-file.out ./.;ssh -l parallel lo -- exec 'sh -c '"'"'rm -f ./.TMPWORKDIR/abc-file 2>/dev/null;rmdir ./.TMPWORKDIR/ ./.parallel/tmp/ ./.parallel/ 2>/dev/null;rm -rf ./.TMPWORKDIR;'"'";ssh -l parallel lo -- exec 'sh -c '"'"'rm -f ./.TMPWORKDIR/abc-file.out 2>/dev/null;rmdir ./.TMPWORKDIR/ ./.parallel/tmp/ ./.parallel/ 2>/dev/null;rm -rf ./.TMPWORKDIR;'"'";ssh -l parallel lo -- exec rm -rf .TMPWORKDIR;exit $_EXIT_status;
|
2017-07-21 19:43:34 +00:00
|
|
|
parset myvar1,myvar2 echo ::: a b
|
|
|
|
echo $myvar1
|
|
|
|
echo $myvar2
|
2018-05-22 23:07:40 +00:00
|
|
|
Unknown option: myvar1,myvar2
|
|
|
|
Unknown option: echo
|
|
|
|
Unknown option: :::
|
|
|
|
Unknown option: a
|
|
|
|
Unknown option: b
|
|
|
|
parset only works if it is a function. The function is defined as part
|
|
|
|
of env_parallel.
|
|
|
|
Do the below 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
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2018-05-22 23:07:40 +00:00
|
|
|
ksh: Put this in $HOME/.kshrc: source `which env_parallel.ksh`
|
|
|
|
E.g. by doing: echo 'source `which env_parallel.ksh`' >> $HOME/.kshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2018-08-22 22:21:29 +00:00
|
|
|
mksh: Put this in $HOME/.mkshrc: source `which env_parallel.mksh`
|
|
|
|
E.g. by doing: echo 'source `which env_parallel.mksh`' >> $HOME/.mkshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2018-05-22 23:07:40 +00:00
|
|
|
pdksh: Put this in $HOME/.profile: source `which env_parallel.pdksh`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.pdksh`' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
|
|
|
zsh: Put this in $HOME/.zshrc: . `which env_parallel.zsh`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.zsh`' >> $HOME/.zshenv
|
|
|
|
Supports: variables, functions, arrays
|
2018-05-22 23:07:40 +00:00
|
|
|
ash: Put this in $HOME/.profile: . `which env_parallel.ash`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.ash`' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases
|
2018-05-22 23:07:40 +00:00
|
|
|
dash: Put this in $HOME/.profile: . `which env_parallel.dash`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.dash`' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases
|
|
|
|
fish: Unsupported
|
2018-05-22 23:07:40 +00:00
|
|
|
csh: Unsupported
|
|
|
|
tcsh: Unsupported
|
|
|
|
To install in all shells run:
|
|
|
|
parset --install
|
2022-05-13 23:27:17 +00:00
|
|
|
In a script you need to run this before using parset:
|
|
|
|
bash: . `which env_parallel.bash`
|
|
|
|
ksh: source `which env_parallel.ksh`
|
|
|
|
mksh: source `which env_parallel.mksh`
|
|
|
|
pdksh: source `which env_parallel.pdksh`
|
|
|
|
zsh: . `which env_parallel.zsh`
|
|
|
|
ash: . `which env_parallel.ash`
|
|
|
|
dash: . `which env_parallel.dash`
|
2018-05-22 23:07:40 +00:00
|
|
|
For details: see man parset
|
2017-07-21 19:43:34 +00:00
|
|
|
parset myarray seq {} 5 ::: 1 2 3
|
|
|
|
echo "${myarray[1]}"
|
2018-05-22 23:07:40 +00:00
|
|
|
Unknown option: myarray
|
|
|
|
Unknown option: seq
|
|
|
|
Unknown option: {}
|
|
|
|
Unknown option: 5
|
|
|
|
Unknown option: :::
|
|
|
|
Unknown option: 1
|
|
|
|
Unknown option: 2
|
|
|
|
Unknown option: 3
|
|
|
|
parset only works if it is a function. The function is defined as part
|
|
|
|
of env_parallel.
|
|
|
|
Do the below 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
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2018-05-22 23:07:40 +00:00
|
|
|
ksh: Put this in $HOME/.kshrc: source `which env_parallel.ksh`
|
|
|
|
E.g. by doing: echo 'source `which env_parallel.ksh`' >> $HOME/.kshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2018-08-22 22:21:29 +00:00
|
|
|
mksh: Put this in $HOME/.mkshrc: source `which env_parallel.mksh`
|
|
|
|
E.g. by doing: echo 'source `which env_parallel.mksh`' >> $HOME/.mkshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2018-05-22 23:07:40 +00:00
|
|
|
pdksh: Put this in $HOME/.profile: source `which env_parallel.pdksh`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.pdksh`' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
|
|
|
zsh: Put this in $HOME/.zshrc: . `which env_parallel.zsh`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.zsh`' >> $HOME/.zshenv
|
|
|
|
Supports: variables, functions, arrays
|
2018-05-22 23:07:40 +00:00
|
|
|
ash: Put this in $HOME/.profile: . `which env_parallel.ash`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.ash`' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases
|
2018-05-22 23:07:40 +00:00
|
|
|
dash: Put this in $HOME/.profile: . `which env_parallel.dash`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.dash`' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases
|
|
|
|
fish: Unsupported
|
2018-05-22 23:07:40 +00:00
|
|
|
csh: Unsupported
|
|
|
|
tcsh: Unsupported
|
|
|
|
To install in all shells run:
|
|
|
|
parset --install
|
2022-05-13 23:27:17 +00:00
|
|
|
In a script you need to run this before using parset:
|
|
|
|
bash: . `which env_parallel.bash`
|
|
|
|
ksh: source `which env_parallel.ksh`
|
|
|
|
mksh: source `which env_parallel.mksh`
|
|
|
|
pdksh: source `which env_parallel.pdksh`
|
|
|
|
zsh: . `which env_parallel.zsh`
|
|
|
|
ash: . `which env_parallel.ash`
|
|
|
|
dash: . `which env_parallel.dash`
|
2018-05-22 23:07:40 +00:00
|
|
|
For details: see man parset
|
2017-07-21 19:43:34 +00:00
|
|
|
cmd=("echo '<<joe \"double space\" cartoon>>'" "pwd")
|
|
|
|
parset data ::: "${cmd[@]}"
|
|
|
|
echo "${data[0]}"
|
|
|
|
echo "${data[1]}"
|
2018-05-22 23:07:40 +00:00
|
|
|
Unknown option: data
|
|
|
|
Unknown option: :::
|
|
|
|
Unknown option: echo '<<joe "double space" cartoon>>'
|
|
|
|
Unknown option: pwd
|
|
|
|
parset only works if it is a function. The function is defined as part
|
|
|
|
of env_parallel.
|
|
|
|
Do the below 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
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2018-05-22 23:07:40 +00:00
|
|
|
ksh: Put this in $HOME/.kshrc: source `which env_parallel.ksh`
|
|
|
|
E.g. by doing: echo 'source `which env_parallel.ksh`' >> $HOME/.kshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2018-08-22 22:21:29 +00:00
|
|
|
mksh: Put this in $HOME/.mkshrc: source `which env_parallel.mksh`
|
|
|
|
E.g. by doing: echo 'source `which env_parallel.mksh`' >> $HOME/.mkshrc
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
2018-05-22 23:07:40 +00:00
|
|
|
pdksh: Put this in $HOME/.profile: source `which env_parallel.pdksh`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.pdksh`' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases, functions, arrays
|
|
|
|
zsh: Put this in $HOME/.zshrc: . `which env_parallel.zsh`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.zsh`' >> $HOME/.zshenv
|
|
|
|
Supports: variables, functions, arrays
|
2018-05-22 23:07:40 +00:00
|
|
|
ash: Put this in $HOME/.profile: . `which env_parallel.ash`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.ash`' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases
|
2018-05-22 23:07:40 +00:00
|
|
|
dash: Put this in $HOME/.profile: . `which env_parallel.dash`
|
|
|
|
E.g. by doing: echo '. `which env_parallel.dash`' >> $HOME/.profile
|
2021-06-22 17:40:07 +00:00
|
|
|
Supports: variables, aliases
|
|
|
|
fish: Unsupported
|
2018-05-22 23:07:40 +00:00
|
|
|
csh: Unsupported
|
|
|
|
tcsh: Unsupported
|
|
|
|
To install in all shells run:
|
|
|
|
parset --install
|
2022-05-13 23:27:17 +00:00
|
|
|
In a script you need to run this before using parset:
|
|
|
|
bash: . `which env_parallel.bash`
|
|
|
|
ksh: source `which env_parallel.ksh`
|
|
|
|
mksh: source `which env_parallel.mksh`
|
|
|
|
pdksh: source `which env_parallel.pdksh`
|
|
|
|
zsh: . `which env_parallel.zsh`
|
|
|
|
ash: . `which env_parallel.ash`
|
|
|
|
dash: . `which env_parallel.dash`
|
2018-05-22 23:07:40 +00:00
|
|
|
For details: see man parset
|
2020-04-22 18:15:59 +00:00
|
|
|
parallel --sqlandworker csv:///%2Ftmp/log.csv \
|
2017-04-01 00:59:07 +00:00
|
|
|
seq ::: 10 ::: 12 13 14
|
2016-03-20 22:57:25 +00:00
|
|
|
cat /tmp/log.csv
|
2016-05-17 00:11:38 +00:00
|
|
|
99
|
2016-03-20 22:57:25 +00:00
|
|
|
Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr
|
|
|
|
1,:,000000000.000,0.000,0,9,0,0,"seq 10 12",10,12,"10
|
2016-05-17 00:11:38 +00:00
|
|
|
99
|
2016-03-20 22:57:25 +00:00
|
|
|
",
|
|
|
|
2,:,000000000.000,0.000,0,12,0,0,"seq 10 13",10,13,"10
|
2016-05-17 00:11:38 +00:00
|
|
|
99
|
2016-03-20 22:57:25 +00:00
|
|
|
",
|
|
|
|
3,:,000000000.000,0.000,0,15,0,0,"seq 10 14",10,14,"10
|
2016-05-17 00:11:38 +00:00
|
|
|
99
|
2016-03-20 22:57:25 +00:00
|
|
|
",
|
2020-04-22 18:15:59 +00:00
|
|
|
parallel --results outdir --sqlandworker csv:///%2Ftmp/log2.csv \
|
2017-04-01 00:59:07 +00:00
|
|
|
seq ::: 10 ::: 12 13 14
|
2016-03-26 09:35:13 +00:00
|
|
|
cat /tmp/log2.csv
|
|
|
|
Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr
|
|
|
|
1,:,000000000.000,0.000,0,9,0,0,"seq 10 12",10,12,outdir/1/10/2/12/stdout,outdir/1/10/2/12/stderr
|
|
|
|
2,:,000000000.000,0.000,0,12,0,0,"seq 10 13",10,13,outdir/1/10/2/13/stdout,outdir/1/10/2/13/stderr
|
|
|
|
3,:,000000000.000,0.000,0,15,0,0,"seq 10 14",10,14,outdir/1/10/2/14/stdout,outdir/1/10/2/14/stderr
|
2016-01-23 08:54:05 +00:00
|
|
|
vendor://[[user][:password]@][host][:port]/[database[/table]
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 1: vendor://[[user][:password]@][host][:port]/[database[/table]: No such file or directory
|
2016-01-23 08:54:05 +00:00
|
|
|
sqlite3:///%2Ftmp%2Fmydatabase/mytable
|
2020-04-22 18:15:59 +00:00
|
|
|
csv:///%2Ftmp/log.csv
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 1: sqlite3:///%2Ftmp%2Fmydatabase/mytable: No such file or directory
|
|
|
|
/usr/bin/bash: line 2: csv:///%2Ftmp/log.csv: No such file or directory
|
2016-01-23 08:54:05 +00:00
|
|
|
DBURL=sqlite3:///%2Ftmp%2Fmydatabase
|
|
|
|
DBURLTABLE=$DBURL/mytable
|
|
|
|
parallel --sqlandworker $DBURLTABLE echo ::: foo bar ::: baz quuz
|
|
|
|
foo baz
|
|
|
|
foo quuz
|
|
|
|
bar baz
|
|
|
|
bar quuz
|
|
|
|
sql $DBURL 'SELECT * FROM mytable ORDER BY Seq;'
|
2024-07-17 09:12:08 +00:00
|
|
|
sql: Error: SELECT * FROM mytable ORDER BY Seq; is not a valid DBURL
|
|
|
|
Usage:
|
|
|
|
sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
|
|
|
|
sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
|
|
|
|
See 'man sql' for the options
|
2016-03-20 22:57:25 +00:00
|
|
|
parallel --sqlmaster $DBURLTABLE echo ::: foo bar ::: baz quuz
|
2016-01-23 08:54:05 +00:00
|
|
|
parallel: Error: echo is not a valid DBURL
|
|
|
|
parallel --sqlworker $DBURLTABLE echo ::: foo bar ::: baz quuz
|
|
|
|
parallel: Error: echo is not a valid DBURL
|
2015-04-09 23:20:51 +00:00
|
|
|
cat num1000000 | parallel --pipe wc
|
2016-07-22 16:10:28 +00:00
|
|
|
999999 999999 9999999
|
2015-08-04 05:54:40 +00:00
|
|
|
85352 85352 597465
|
2015-04-09 23:20:51 +00:00
|
|
|
cat num1000000 | parallel --pipe --block 2M wc
|
2016-07-22 16:10:28 +00:00
|
|
|
999999 999999 9999999
|
2015-04-04 14:37:32 +00:00
|
|
|
85349 85349 597444
|
2019-04-21 18:16:33 +00:00
|
|
|
cat num1000000 | parallel --pipe -j4 --roundrobin wc
|
2016-07-22 16:10:28 +00:00
|
|
|
999999 999999 9999999
|
2015-04-09 23:20:51 +00:00
|
|
|
cat num1000000 | parallel --pipe -N140000 wc
|
2015-04-04 14:37:32 +00:00
|
|
|
140000 140000 868895
|
|
|
|
140000 140000 980000
|
|
|
|
20000 20000 140001
|
2015-04-09 23:20:51 +00:00
|
|
|
cat num1000000 | parallel --pipe -L75 wc
|
2016-07-22 16:10:28 +00:00
|
|
|
999999 999999 9999999
|
2015-08-04 05:54:40 +00:00
|
|
|
85500 85500 598500
|
2015-04-04 14:37:32 +00:00
|
|
|
25 25 176
|
2017-04-01 00:59:07 +00:00
|
|
|
cat fixedlen | parallel --pipe --header .{4} --block 3 --recend '' \
|
|
|
|
'echo start; cat; echo'
|
|
|
|
start
|
|
|
|
echo /foo, bar/, /baz, qux/, | \
|
|
|
|
parallel -kN1 --recend ', ' --pipe echo JOB{#}\;cat\;echo END
|
2015-04-04 14:37:32 +00:00
|
|
|
/foo, END
|
|
|
|
bar/, END
|
|
|
|
/baz, END
|
|
|
|
qux/,
|
2017-04-01 00:59:07 +00:00
|
|
|
echo /foo, bar/, /baz, qux/, | \
|
|
|
|
parallel -kN1 --recstart / --pipe echo JOB{#}\;cat\;echo END
|
2015-04-04 14:37:32 +00:00
|
|
|
/foo, barEND
|
|
|
|
/, END
|
|
|
|
/baz, quxEND
|
|
|
|
/,
|
2017-04-01 00:59:07 +00:00
|
|
|
echo /foo, bar/, /baz, qux/, | \
|
|
|
|
parallel -kN1 --recend ', ' --recstart / --pipe \
|
|
|
|
echo JOB{#}\;cat\;echo END
|
2015-04-04 14:37:32 +00:00
|
|
|
/foo, bar/, END
|
|
|
|
/baz, qux/,
|
2017-04-01 00:59:07 +00:00
|
|
|
echo foo,bar,_baz,__qux, | \
|
|
|
|
parallel -kN1 --regexp --recend ,_+ --pipe \
|
|
|
|
echo JOB{#}\;cat\;echo END
|
2015-04-04 14:37:32 +00:00
|
|
|
foo,bar,_END
|
|
|
|
baz,__END
|
|
|
|
qux,
|
2017-04-01 00:59:07 +00:00
|
|
|
echo foo,bar,_baz,__qux, | \
|
|
|
|
parallel -kN1 --rrs --regexp --recend ,_+ --pipe \
|
|
|
|
echo JOB{#}\;cat\;echo END
|
2015-04-04 14:37:32 +00:00
|
|
|
foo,barEND
|
|
|
|
bazEND
|
|
|
|
qux,
|
2017-04-01 00:59:07 +00:00
|
|
|
cat num_%header | \
|
|
|
|
parallel --header '(%.*\n)*' --pipe -N3 echo JOB{#}\;cat
|
|
|
|
cat: num_%header: No such file or directory
|
2015-04-09 23:20:51 +00:00
|
|
|
cat num_%header | parallel --header 2 --pipe -N3 echo JOB{#}\;cat
|
2017-04-01 00:59:07 +00:00
|
|
|
cat: num_%header: No such file or directory
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --pipepart -a num1000000 --block 3m wc
|
2016-07-22 16:10:28 +00:00
|
|
|
999999 999999 9999999
|
2015-04-04 14:37:32 +00:00
|
|
|
126984 126984 888889
|
2015-04-09 23:20:51 +00:00
|
|
|
cat input_file | parallel command
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 1: This is input_file: command not found
|
2015-04-09 23:20:51 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#!/usr/bin/parallel --shebang -r echo
|
|
|
|
foo
|
|
|
|
bar
|
|
|
|
baz
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 1: foo: command not found
|
|
|
|
/usr/bin/bash: line 2: bar: command not found
|
|
|
|
/usr/bin/bash: line 3: baz: command not found
|
2015-04-09 23:20:51 +00:00
|
|
|
cat input_file | parallel command
|
|
|
|
parallel command ::: foo bar
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 1: This is input_file: command not found
|
|
|
|
/usr/bin/bash: line 1: foo: command not found
|
|
|
|
/usr/bin/bash: line 1: bar: command not found
|
2015-04-09 23:20:51 +00:00
|
|
|
cat input_file | command
|
|
|
|
command foo bar
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 2: foo: command not found
|
2015-04-09 23:20:51 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
print "@ARGV\n"
|
2022-05-22 08:36:45 +00:00
|
|
|
Warning: unknown mime-type for "@ARGV\n" -- using "application/octet-stream"
|
2015-04-04 14:37:32 +00:00
|
|
|
Error: no such file "@ARGV\n"
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel perl_echo ::: foo bar
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 1: perl_echo: command not found
|
2015-04-09 23:20:51 +00:00
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/perl
|
|
|
|
print "@ARGV\n"
|
2022-05-22 08:36:45 +00:00
|
|
|
Warning: unknown mime-type for "@ARGV\n" -- using "application/octet-stream"
|
2015-04-04 14:37:32 +00:00
|
|
|
Error: no such file "@ARGV\n"
|
2015-04-09 23:20:51 +00:00
|
|
|
perl_echo foo bar
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 1: perl_echo: command not found
|
2016-01-23 08:54:05 +00:00
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/perl
|
|
|
|
print "Arguments @ARGV\n";
|
2022-05-22 08:36:45 +00:00
|
|
|
Warning: unknown mime-type for "Arguments @ARGV\n" -- using "application/octet-stream"
|
2016-01-23 08:54:05 +00:00
|
|
|
Error: no such file "Arguments @ARGV\n"
|
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/python
|
|
|
|
print 'Arguments', str(sys.argv)
|
|
|
|
#!/usr/bin/parallel --shebang-wrap /bin/bash
|
|
|
|
echo Arguments "$@"
|
|
|
|
Arguments
|
|
|
|
#!/usr/bin/parallel --shebang-wrap /bin/csh
|
|
|
|
echo Arguments "$argv"
|
|
|
|
Arguments
|
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/tclsh
|
|
|
|
puts "Arguments $argv"
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 3: puts: command not found
|
2016-01-23 08:54:05 +00:00
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/Rscript --vanilla --slave
|
|
|
|
args <- commandArgs(trailingOnly = TRUE)
|
|
|
|
print(paste("Arguments ",args))
|
|
|
|
#!/usr/bin/parallel --shebang-wrap ARG={} /usr/bin/gnuplot
|
|
|
|
print "Arguments ", system('echo $ARG')
|
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/ruby
|
|
|
|
print "Arguments "
|
|
|
|
puts ARGV
|
2022-05-22 08:36:45 +00:00
|
|
|
Warning: unknown mime-type for "Arguments " -- using "application/octet-stream"
|
2016-01-23 08:54:05 +00:00
|
|
|
Error: no such file "Arguments "
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 4: puts: command not found
|
2016-01-23 08:54:05 +00:00
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/octave
|
|
|
|
printf ("Arguments");
|
|
|
|
arg_list = argv ();
|
|
|
|
for i = 1:nargin
|
|
|
|
printf (" %s", arg_list{i});
|
|
|
|
endfor
|
|
|
|
printf ("\n");
|
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/clisp
|
|
|
|
(format t "~&~S~&" 'Arguments)
|
|
|
|
(format t "~&~S~&" *args*)
|
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/php
|
|
|
|
<?php
|
|
|
|
echo "Arguments";
|
|
|
|
foreach(array_slice($argv,1) as $v)
|
|
|
|
{
|
|
|
|
echo " $v";
|
|
|
|
}
|
|
|
|
echo "\n";
|
|
|
|
?>
|
|
|
|
Arguments
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 2: ?php: No such file or directory
|
2016-01-23 08:54:05 +00:00
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/node
|
|
|
|
var myArgs = process.argv.slice(2);
|
|
|
|
console.log('Arguments ', myArgs);
|
|
|
|
#!/usr/bin/parallel --shebang-wrap /usr/bin/lua
|
|
|
|
io.write "Arguments"
|
|
|
|
for a = 1, #arg do
|
|
|
|
io.write(" ")
|
|
|
|
io.write(arg[a])
|
|
|
|
end
|
2023-02-19 13:49:30 +00:00
|
|
|
print(")
|
2022-05-22 08:36:45 +00:00
|
|
|
/usr/bin/bash: line 3: io.write: command not found
|
2016-01-23 08:54:05 +00:00
|
|
|
#!/usr/bin/parallel --shebang-wrap ARGV={} /usr/bin/csharp
|
|
|
|
var argv = Environment.GetEnvironmentVariable("ARGV");
|
|
|
|
print("Arguments "+argv);
|
2015-04-09 23:20:51 +00:00
|
|
|
sem 'sleep 1; echo The first finished' &&
|
|
|
|
echo The first is now running in the background &&
|
|
|
|
sem 'sleep 1; echo The second finished' &&
|
|
|
|
echo The second is now running in the background
|
|
|
|
sem --wait
|
2015-04-04 14:37:32 +00:00
|
|
|
The first is now running in the background
|
|
|
|
The first finished
|
|
|
|
The second is now running in the background
|
2015-04-09 23:20:51 +00:00
|
|
|
sem --fg 'sleep 1; echo The first finished' &&
|
|
|
|
echo The first finished running in the foreground &&
|
|
|
|
sem --fg 'sleep 1; echo The second finished' &&
|
|
|
|
echo The second finished running in the foreground
|
|
|
|
sem --wait
|
2015-04-04 14:37:32 +00:00
|
|
|
The first finished
|
|
|
|
The first finished running in the foreground
|
|
|
|
The second finished running in the foreground
|
2015-05-21 21:02:55 +00:00
|
|
|
sem --id foo -u 'echo Slow started; sleep 5; echo Slow ended' &&
|
2017-04-01 00:59:07 +00:00
|
|
|
sem --id foo --semaphoretimeout 1 'echo Forced running after 1 sec' &&
|
|
|
|
sem --id foo --semaphoretimeout -2 'echo Give up after 2 secs'
|
2015-05-21 21:02:55 +00:00
|
|
|
sem --id foo --wait
|
|
|
|
Slow started
|
2017-04-01 00:59:07 +00:00
|
|
|
Forced running after 1 sec
|
2015-05-21 21:02:55 +00:00
|
|
|
Slow ended
|
|
|
|
parallel: Warning: Semaphore timed out. Stealing the semaphore.
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --help
|
2015-04-04 14:37:32 +00:00
|
|
|
Usage:
|
|
|
|
parallel [options] [command [arguments]] < list_of_arguments
|
|
|
|
parallel [options] [command [arguments]] (::: arguments|:::: argfile(s))...
|
|
|
|
cat ... | parallel --pipe [options] [command [arguments]]
|
|
|
|
-j n Run n jobs in parallel
|
|
|
|
-k Keep same order
|
|
|
|
-X Multiple arguments with context replace
|
|
|
|
--colsep regexp Split input on regexp for positional replacements
|
|
|
|
{} {.} {/} {/.} {#} {%} {= perl code =} Replacement strings
|
|
|
|
{3} {3.} {3/} {3/.} {=3 perl code =} Positional replacement strings
|
|
|
|
With --plus: {} = {+/}/{/} = {.}.{+.} = {+/}/{/.}.{+.} = {..}.{+..} =
|
|
|
|
{+/}/{/..}.{+..} = {...}.{+...} = {+/}/{/...}.{+...}
|
|
|
|
-S sshlogin Example: foo@server.example.com
|
|
|
|
--slf .. Use ~/.parallel/sshloginfile as the list of sshlogins
|
|
|
|
--trc {}.bar Shorthand for --transfer --return {}.bar --cleanup
|
|
|
|
--onall Run the given command with argument on all sshlogins
|
|
|
|
--nonall Run the given command with no arguments on all sshlogins
|
|
|
|
--pipe Split stdin (standard input) to multiple jobs.
|
|
|
|
--recend str Record end separator for --pipe.
|
|
|
|
--recstart str Record start separator for --pipe.
|
2020-10-22 19:47:01 +00:00
|
|
|
GNU Parallel can do much more. See 'man parallel' for details
|
2015-04-04 14:37:32 +00:00
|
|
|
Academic tradition requires you to cite works you base your article on.
|
2017-07-21 19:43:34 +00:00
|
|
|
If you use programs that use GNU Parallel to process data for an article in a
|
|
|
|
scientific publication, please cite:
|
2020-09-23 15:41:03 +00:00
|
|
|
|
|
|
|
Zenodo.
|
2015-11-29 23:47:21 +00:00
|
|
|
This helps funding further development; AND IT WON'T COST YOU A CENT.
|
2015-04-04 14:37:32 +00:00
|
|
|
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
2016-03-26 09:35:13 +00:00
|
|
|
parallel --version
|
|
|
|
GNU parallel VERSION
|
2024-01-24 01:02:07 +00:00
|
|
|
Copyright (C) 2007-2024 Ole Tange, http://ole.tange.dk and Free Software
|
2020-02-23 00:10:44 +00:00
|
|
|
Foundation, Inc.
|
2020-07-22 20:45:09 +00:00
|
|
|
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
|
2016-03-26 09:35:13 +00:00
|
|
|
This is free software: you are free to change and redistribute it.
|
|
|
|
GNU parallel comes with no warranty.
|
2020-07-22 20:45:09 +00:00
|
|
|
Web site: https://www.gnu.org/software/parallel
|
2016-03-26 09:35:13 +00:00
|
|
|
When using programs that use GNU Parallel to process data for publication
|
2016-04-11 20:19:28 +00:00
|
|
|
please cite as described in 'parallel --citation'.
|
2017-04-01 00:59:07 +00:00
|
|
|
parallel --minversion VERSION && \
|
|
|
|
echo Your version is at least VERSION.
|
2015-05-25 22:08:31 +00:00
|
|
|
Your version is at least VERSION.
|
2016-05-22 12:08:47 +00:00
|
|
|
parallel --citation
|
2015-04-04 14:37:32 +00:00
|
|
|
Academic tradition requires you to cite works you base your article on.
|
2017-07-21 19:43:34 +00:00
|
|
|
If you use programs that use GNU Parallel to process data for an article in a
|
|
|
|
scientific publication, please cite:
|
2020-09-23 15:41:03 +00:00
|
|
|
|
2018-05-22 23:07:40 +00:00
|
|
|
author = {Tange, Ole},
|
2020-09-23 15:41:03 +00:00
|
|
|
|
2023-01-29 23:40:56 +00:00
|
|
|
year = 2023,
|
2020-07-22 20:45:09 +00:00
|
|
|
note = {{GNU Parallel is a general parallelizer to run
|
|
|
|
multiple serial command line programs in parallel
|
|
|
|
without changing them.}},
|
|
|
|
publisher = {Zenodo},
|
2020-09-23 15:41:03 +00:00
|
|
|
|
|
|
|
url = {
|
2015-04-04 14:37:32 +00:00
|
|
|
}
|
2020-09-23 15:41:03 +00:00
|
|
|
|
2015-11-29 23:47:21 +00:00
|
|
|
This helps funding further development; AND IT WON'T COST YOU A CENT.
|
2015-04-04 14:37:32 +00:00
|
|
|
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
2018-05-22 23:07:40 +00:00
|
|
|
More about funding GNU Parallel and the citation notice:
|
2019-04-21 18:16:33 +00:00
|
|
|
https://lists.gnu.org/archive/html/parallel/2013-11/msg00006.html
|
2023-01-30 21:51:56 +00:00
|
|
|
https://www.gnu.org/software/tempfileallel_design.html#citation-notice
|
2022-05-02 20:38:23 +00:00
|
|
|
https:BASE64-notice-faq.txt
|
2016-03-20 22:57:25 +00:00
|
|
|
parallel --number-of-cpus
|
2015-04-09 23:20:51 +00:00
|
|
|
parallel --number-of-cores
|
2016-05-17 00:11:38 +00:00
|
|
|
9
|
2015-04-09 23:20:51 +00:00
|
|
|
echo '--nice 17' > ~/.parallel/nicetimeout
|
|
|
|
echo '--timeout 300%' >> ~/.parallel/nicetimeout
|
|
|
|
parallel --profile nicetimeout echo ::: A B C
|
|
|
|
echo '-vv --dry-run' > ~/.parallel/dryverbose
|
|
|
|
parallel --profile dryverbose --profile nicetimeout echo ::: A B C
|
2015-08-04 05:54:40 +00:00
|
|
|
echo A
|
|
|
|
echo B
|
|
|
|
echo C
|
2023-01-30 21:51:56 +00:00
|
|
|
### 3+3 .par files (from --files), 1 .tms-file from tmux attach
|
|
|
|
A
|
|
|
|
A
|
|
|
|
B
|
|
|
|
B
|
|
|
|
C
|
|
|
|
C
|