parallel: ssh command hexed to a script in $PARALLEL_REMOTE_TMPDIR.
[parallel.git] / testsuite / wanted-results / parallel-tutorial
blobd59f963201dfd572079221eb95529d1094d6acb7
1 ### test parallel_tutorial
2      fetch -o - http://pi.dk/3 ) > install.sh
3   $ sha1sum install.sh
4   12345678 3374ec53 bacb199b 245af2dd a86df6c9
5   $ md5sum install.sh
6   029a9ac0 6e8b5bc6 052eac57 b2c3c9ca
7   $ sha512sum install.sh
8   40f53af6 9e20dae5 713ba06c f517006d 9897747b ed8a4694 b1acba1b 1464beb4
9   60055629 3f2356f3 3e9c4e3c 76e3f3af a9db4b32 bd33322b 975696fc e6b23cfb
10   $ bash install.sh
11 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
12 /usr/bin/bash: -c: line 0: `     fetch -o - http://pi.dk/3 ) > install.sh'
13   parallel -k echo ::: A B C > abc-file
14   parallel -k echo ::: D E F > def-file
15   perl -e 'printf "A\0B\0C\0"' > abc0-file
16   perl -e 'printf "A_B_C_"' > abc_-file
17   perl -e 'printf "f1\tf2\nA\tB\nC\tD\n"' > tsv-file.tsv
18   perl -e 'for(1..8){print "$_\n"}' > num8
19   perl -e 'for(1..128){print "$_\n"}' > num128
20   perl -e 'for(1..30000){print "$_\n"}' > num30000
21   perl -e 'for(1..1000000){print "$_\n"}' > num1000000
22   (echo %head1; echo %head2; \
23 sleep .3
24 /usr/bin/bash: -c: line 2: syntax error: unexpected end of file
25 sleep .3
26    perl -e 'for(1..10){print "$_\n"}') > num_%header
27 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
28 /usr/bin/bash: -c: line 0: `   perl -e 'for(1..10){print "$_\n"}') > num_%header'
29   perl -e 'print "HHHHAAABBBCCC"' > fixedlen
30   parallel echo ::: A B C
31   parallel -a abc-file echo
32   cat abc-file | parallel echo
33   parallel echo ::: A B C ::: D E F
34 A D
35 A E
36 A F
37 B D
38 B E
39 B F
40 C D
41 C E
42 C F
43   parallel -a abc-file -a def-file echo
44 A D
45 A E
46 A F
47 B D
48 B E
49 B F
50 C D
51 C E
52 C F
53   cat abc-file | parallel -a - -a def-file echo
54 A D
55 A E
56 A F
57 B D
58 B E
59 B F
60 C D
61 C E
62 C F
63   cat abc-file | parallel echo :::: - def-file
64 A D
65 A E
66 A F
67 B D
68 B E
69 B F
70 C D
71 C E
72 C F
73   parallel echo ::: A B C :::: def-file
74 A D
75 A E
76 A F
77 B D
78 B E
79 B F
80 C D
81 C E
82 C F
83   parallel --link echo ::: A B C ::: D E F
84 A D
85 B E
86 C F
87   parallel --link echo ::: A B C D E ::: F G
88 A F
89 B G
90 C F
91 D G
92 E F
93   parallel echo :::: abc-file :::+ G H I :::: def-file
94 A G D
95 A G E
96 A G F
97 B H D
98 B H E
99 B H F
100 C I D
101 C I E
102 C I F
103   parallel echo :::: abc-file ::: G H I ::::+ def-file
104 A G D
105 A H E
106 A I F
107 B G D
108 B H E
109 B I F
110 C G D
111 C H E
112 C I F
113   parallel echo ::: A B C D E :::+ F G
114 A F
115 B G
116   parallel --arg-sep ,, echo ,, A B C :::: def-file
117 A D
118 A E
119 A F
120 B D
121 B E
122 B F
123 C D
124 C E
125 C F
126   parallel --arg-file-sep // echo ::: A B C // def-file
127 A D
128 A E
129 A F
130 B D
131 B E
132 B F
133 C D
134 C E
135 C F
136   parallel -d _ echo :::: abc_-file
137   parallel -d '\0' echo :::: abc0-file
138   parallel -E stop echo ::: A B stop C D
139   (echo 1; echo; echo 2) | parallel --no-run-if-empty echo
141   parallel ::: ls 'echo foo' pwd
142 abc-file
143 abc0-file
144 abc_-file
145 def-file
146 fixedlen
147 num1000000
148 num128
149 num30000
150 num8
151 tsv-file.tsv
154   my_func() {
155     echo in my_func $1
156   }
157   export -f my_func
158   parallel my_func ::: 1 2 3
159 in my_func 1
160 in my_func 2
161 in my_func 3
162   parallel echo ::: A/B.C
163 A/B.C
164   parallel echo {} ::: A/B.C
165 A/B.C
166   parallel echo {.} ::: A/B.C
168   parallel echo {/} ::: A/B.C
170   parallel echo {//} ::: A/B.C
171   parallel echo {/.} ::: A/B.C
172   parallel echo {#} ::: A B C
174   parallel -j 2 echo {%} ::: A B C
176   parallel -I ,, echo ,, ::: A/B.C
177 A/B.C
178   parallel --extensionreplace ,, echo ,, ::: A/B.C
180   parallel --basenamereplace ,, echo ,, ::: A/B.C
182   parallel --dirnamereplace ,, echo ,, ::: A/B.C
183   parallel --basenameextensionreplace ,, echo ,, ::: A/B.C
184   parallel --seqreplace ,, echo ,, ::: A B C
186   parallel -j2 --slotreplace ,, echo ,, ::: A B C
188   parallel echo '{= s:\.[^.]+$::;s:\.[^.]+$::; =}' ::: foo.tar.gz
190   parallel echo Job {#} of {= '$_=total_jobs()' =} ::: {1..5}
191 Job 1 of 5
192 Job 2 of 5
193 Job 3 of 5
194 Job 4 of 5
195 Job 5 of 5
196   parallel echo {} shell quoted is {= '$_=Q($_)' =} ::: '*/!#$'
197 */!#$ shell quoted is '*/!#$'
198   parallel echo {= 'if($_==3) { skip() }' =} ::: {1..5}
200   parallel echo {= 'if($arg[1]==$arg[2]) { skip() }' =} \
201     ::: {1..3} ::: {1..3}
202 1 2
203 1 3
204 2 1
205 2 3
206 3 1
207 3 2
208   parallel --parens ,,,, echo ',, s:\.[^.]+$::;s:\.[^.]+$::; ,,' \
209     ::: foo.tar.gz
211   parallel --rpl '.. s:\.[^.]+$::;s:\.[^.]+$::;' echo '..' \
212     ::: foo.tar.gz
214   parallel --rpl '{..} s:\.[^.]+$::;s:\.[^.]+$::;' echo '{..}'
215     ::: foo.tar.gz
216 /usr/bin/bash: line 1: :::: command not found
217   parallel --rpl '{%(.+?)} s/$$1$//;' echo {%.tar.gz}.zip ::: foo.tar.gz
218 foo.zip
219   parallel --rpl '{/(.+?)/(.*?)} s/$$1/$$2/;' echo {/tar.gz/zip} \
220     ::: foo.tar.gz
221 foo.zip
222   --rpl '{} '
223   --rpl '{#} $_=$job->seq()'
224   --rpl '{%} $_=$job->slot()'
225   --rpl '{/} s:.*/::'
226   --rpl '{//} $Global::use{"File::Basename"} ||=
227            eval "use File::Basename; 1;"; $_ = dirname($_);'
228   --rpl '{/.} s:.*/::; s:\.[^/.]+$::;'
229   --rpl '{.} s:\.[^/.]+$::'
230 /usr/bin/bash: --rpl: command not found
231 /usr/bin/bash: line 1: --rpl: command not found
232 /usr/bin/bash: line 2: --rpl: command not found
233 /usr/bin/bash: line 3: --rpl: command not found
234 /usr/bin/bash: line 5: --rpl: command not found
235 /usr/bin/bash: line 6: --rpl: command not found
236 /usr/bin/bash: line 7: --rpl: command not found
237   parallel echo {1} and {2} ::: A B ::: C D
238 A and C
239 A and D
240 B and C
241 B and D
242   parallel echo /={1/} //={1//} /.={1/.} .={1.} ::: A/B.C D/E.F
243 /=B.C //=A /.=B .=A/B
244 /=E.F //=D /.=E .=D/E
245   parallel echo 1={1} 2={2} 3={3} -1={-1} -2={-2} -3={-3} \
246     ::: A B ::: C D ::: E F
247 1=A 2=C 3=E -1=E -2=C -3=A
248 1=A 2=C 3=F -1=F -2=C -3=A
249 1=A 2=D 3=E -1=E -2=D -3=A
250 1=A 2=D 3=F -1=F -2=D -3=A
251 1=B 2=C 3=E -1=E -2=C -3=B
252 1=B 2=C 3=F -1=F -2=C -3=B
253 1=B 2=D 3=E -1=E -2=D -3=B
254 1=B 2=D 3=F -1=F -2=D -3=B
255   parallel echo '{=2 s:\.[^.]+$::;s:\.[^.]+$::; =} {1}' \
256     ::: bar ::: foo.tar.gz
257 foo bar
258   parallel --rpl '{..} s:\.[^.]+$::;s:\.[^.]+$::;' echo '{2..} {1}' \
259     ::: bar ::: foo.tar.gz
260 foo bar
261   parallel --colsep '\t' echo 1={1} 2={2} :::: tsv-file.tsv
262 1=f1 2=f2
263 1=A 2=B
264 1=C 2=D
265   parallel --header : echo f1={f1} f2={f2} ::: f1 A B ::: f2 C D
266 f1=A f2=C
267 f1=A f2=D
268 f1=B f2=C
269 f1=B f2=D
270   parallel --header : --colsep '\t' echo f1={f1} f2={f2} \
271     :::: tsv-file.tsv
272 f1=A f2=B
273 f1=C f2=D
274   parallel --plus echo {} ::: dir/sub/file.ex1.ex2.ex3
275   parallel --plus echo {+/}/{/} ::: dir/sub/file.ex1.ex2.ex3
276   parallel --plus echo {.}.{+.} ::: dir/sub/file.ex1.ex2.ex3
277   parallel --plus echo {+/}/{/.}.{+.} ::: dir/sub/file.ex1.ex2.ex3
278   parallel --plus echo {..}.{+..} ::: dir/sub/file.ex1.ex2.ex3
279   parallel --plus echo {+/}/{/..}.{+..} ::: dir/sub/file.ex1.ex2.ex3
280   parallel --plus echo {...}.{+...} ::: dir/sub/file.ex1.ex2.ex3
281   parallel --plus echo {+/}/{/...}.{+...} ::: dir/sub/file.ex1.ex2.ex3
282 dir/sub/file.ex1.ex2.ex3
283   parallel --plus echo Job {#} of {##} ::: {1..5}
284 Job 1 of 5
285 Job 2 of 5
286 Job 3 of 5
287 Job 4 of 5
288 Job 5 of 5
289   unset myvar
290   echo ${myvar:-myval}
291   parallel --plus echo {:-myval} ::: "$myvar"
292 myval
293   myvar=abcAaAdef
294   echo ${myvar:2}
295   parallel --plus echo {:2} ::: "$myvar"
296 cAaAdef
297   echo ${myvar:2:3}
298   parallel --plus echo {:2:3} ::: "$myvar"
299   echo ${myvar#bc}
300   parallel --plus echo {#bc} ::: "$myvar"
301   echo ${myvar#abc}
302   parallel --plus echo {#abc} ::: "$myvar"
303   echo ${myvar%de}
304   parallel --plus echo {%de} ::: "$myvar"
305   echo ${myvar%def}
306   parallel --plus echo {%def} ::: "$myvar"
307   echo ${myvar/def/ghi}
308   parallel --plus echo {/def/ghi} ::: "$myvar"
309   echo ${myvar^a}
310   parallel --plus echo {^a} ::: "$myvar"
311   echo ${myvar^^a}
312   parallel --plus echo {^^a} ::: "$myvar"
313   myvar=AbcAaAdef
314   echo ${myvar,A}
315   parallel --plus echo '{,A}' ::: "$myvar"
316   echo ${myvar,,A}
317   parallel --plus echo '{,,A}' ::: "$myvar"
318 abcAaAdef
319 abcaaadef
320   cat num30000 | parallel --xargs echo | wc -l
322   cat num30000 | parallel --xargs -s 10000 echo | wc -l
324   cat num30000 | parallel --jobs 4 -m echo | wc -l
326   parallel --jobs 4 -m echo ::: 1 2 3 4 5 6 7 8 9 10
327 1 2 3
328 4 5 6
329 7 8 9
331   parallel --jobs 4 -X echo pre-{}-post ::: A B C D E F G
332 pre-A-post pre-B-post
333 pre-C-post pre-D-post
334 pre-E-post pre-F-post
335 pre-G-post
336   parallel -N3 echo ::: A B C D E F G H
337 A B C
338 D E F
339 G H
340   parallel -N3 echo 1={1} 2={2} 3={3} ::: A B C D E F G H
341 1=A 2=B 3=C
342 1=D 2=E 3=F
343 1=G 2=H 3=
344   parallel -N0 echo foo ::: 1 2 3
346   perl -e 'print "@ARGV\n"' A
347   parallel perl -e 'print "@ARGV\n"' ::: This wont work
348   Warning: Input is read from the terminal. You either know what you
349   Warning: are doing (in which case: YOU ARE AWESOME!) or you forgot
350   Warning: ::: or :::: or to pipe data into parallel. If so
351   Warning: Press CTRL-D to exit.
352   perl -e 'print "@ARGV\n"'
353   [CTRL-D]
354 /usr/bin/bash: line 1: Warning:: command not found
355 /usr/bin/bash: -c: line 2: syntax error near unexpected token `('
356 /usr/bin/bash: -c: line 2: `  Warning: are doing (in which case: YOU ARE AWESOME!) or you forgot'
357   parallel --trim r echo pre-{}-post ::: ' A '
358 pre- A-post
359   parallel --trim l echo pre-{}-post ::: ' A '
360 pre-A -post
361   parallel --trim lr echo pre-{}-post ::: ' A '
362 pre-A-post
363   parallel echo \={} ::: zsh bash ls
364 =zsh
365 =bash
367   parallel 'set a="{}"; if( { test -d "$a" } ) echo "$a is a dir"' ::: *
368 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
369 /usr/bin/bash: -c: line 0: `set a="abc-file"; if( { test -d "$a" } ) echo "$a is a dir"'
370 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
371 /usr/bin/bash: -c: line 0: `set a="abc0-file"; if( { test -d "$a" } ) echo "$a is a dir"'
372 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
373 /usr/bin/bash: -c: line 0: `set a="abc_-file"; if( { test -d "$a" } ) echo "$a is a dir"'
374 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
375 /usr/bin/bash: -c: line 0: `set a="def-file"; if( { test -d "$a" } ) echo "$a is a dir"'
376 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
377 /usr/bin/bash: -c: line 0: `set a="fixedlen"; if( { test -d "$a" } ) echo "$a is a dir"'
378 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
379 /usr/bin/bash: -c: line 0: `set a="num1000000"; if( { test -d "$a" } ) echo "$a is a dir"'
380 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
381 /usr/bin/bash: -c: line 0: `set a="num128"; if( { test -d "$a" } ) echo "$a is a dir"'
382 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
383 /usr/bin/bash: -c: line 0: `set a="num30000"; if( { test -d "$a" } ) echo "$a is a dir"'
384 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
385 /usr/bin/bash: -c: line 0: `set a="num8"; if( { test -d "$a" } ) echo "$a is a dir"'
386 /usr/bin/bash: -c: line 0: syntax error near unexpected token `)'
387 /usr/bin/bash: -c: line 0: `set a="tsv-file.tsv"; if( { test -d "$a" } ) echo "$a is a dir"'
388   parallel --tag echo foo-{} ::: A B C
389 A       foo-A
390 B       foo-B
391 C       foo-C
392   parallel --tagstring {}-bar echo foo-{} ::: A B C
393 A-bar   foo-A
394 B-bar   foo-B
395 C-bar   foo-C
396   parallel --dryrun echo {} ::: A B C
397 echo A
398 echo B
399 echo C
400   parallel --verbose echo {} ::: A B C
401 echo A
402 echo B
403 echo C
404   parallel -j2 'printf "%s-start\n%s" {} {};
405     sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
406 4-start
407 2-start
408 2-middle
409 2-end
410 1-start
411 1-middle
412 1-end
413   parallel -j2 --ungroup 'printf "%s-start\n%s" {} {};
414     sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
415 4-start
416 42-start
417 2-middle
418 2-end
419 1-start
420 1-middle
421 1-end
422 -middle
423   parallel -j2 --linebuffer 'printf "%s-start\n%s" {} {};
424     sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
425 4-start
426 2-start
427 2-middle
428 2-end
429 1-start
430 1-middle
431 1-end
432   parallel -j2 -k 'printf "%s-start\n%s" {} {};
433     sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
434 4-start
435 2-start
436 2-middle
437 2-end
438 1-start
439 1-middle
440 1-end
441   parallel --files echo ::: A B C
442 /tmp/parallel-tutorial-tmpdir/parXXXXX.par
443   parallel --tmpdir /var/tmp --files echo ::: A B C
444 /var/tmp/parXXXXX.par
445   parallel --results outdir echo ::: A B C
446   outdir/1/A/seq
447   outdir/1/A/stderr
448   outdir/1/A/stdout
449   outdir/1/B/seq
450   outdir/1/B/stderr
451   outdir/1/B/stdout
452   outdir/1/C/seq
453   outdir/1/C/stderr
454   outdir/1/C/stdout
455 /usr/bin/bash: outdir/1/A/seq: No such file or directory
456 /usr/bin/bash: line 1: outdir/1/A/stderr: No such file or directory
457 /usr/bin/bash: line 2: outdir/1/A/stdout: No such file or directory
458 /usr/bin/bash: line 3: outdir/1/B/seq: No such file or directory
459 /usr/bin/bash: line 4: outdir/1/B/stderr: No such file or directory
460 /usr/bin/bash: line 5: outdir/1/B/stdout: No such file or directory
461 /usr/bin/bash: line 6: outdir/1/C/seq: No such file or directory
462 /usr/bin/bash: line 7: outdir/1/C/stderr: No such file or directory
463 /usr/bin/bash: line 8: outdir/1/C/stdout: No such file or directory
464   parallel --header : --results outdir echo ::: f1 A B ::: f2 C D
465   outdir/f1/A/f2/C/seq
466   outdir/f1/A/f2/C/stderr
467   outdir/f1/A/f2/C/stdout
468   outdir/f1/A/f2/D/seq
469   outdir/f1/A/f2/D/stderr
470   outdir/f1/A/f2/D/stdout
471   outdir/f1/B/f2/C/seq
472   outdir/f1/B/f2/C/stderr
473   outdir/f1/B/f2/C/stdout
474   outdir/f1/B/f2/D/seq
475   outdir/f1/B/f2/D/stderr
476   outdir/f1/B/f2/D/stdout
477 /usr/bin/bash: outdir/f1/A/f2/C/seq: No such file or directory
478 /usr/bin/bash: line 1: outdir/f1/A/f2/C/stderr: No such file or directory
479 /usr/bin/bash: line 2: outdir/f1/A/f2/C/stdout: No such file or directory
480 /usr/bin/bash: line 3: outdir/f1/A/f2/D/seq: No such file or directory
481 /usr/bin/bash: line 4: outdir/f1/A/f2/D/stderr: No such file or directory
482 /usr/bin/bash: line 5: outdir/f1/A/f2/D/stdout: No such file or directory
483 /usr/bin/bash: line 6: outdir/f1/B/f2/C/seq: No such file or directory
484 /usr/bin/bash: line 7: outdir/f1/B/f2/C/stderr: No such file or directory
485 /usr/bin/bash: line 8: outdir/f1/B/f2/C/stdout: No such file or directory
486 /usr/bin/bash: line 9: outdir/f1/B/f2/D/seq: No such file or directory
487 /usr/bin/bash: line 10: outdir/f1/B/f2/D/stderr: No such file or directory
488 /usr/bin/bash: line 11: outdir/f1/B/f2/D/stdout: No such file or directory
489   /usr/bin/time -f %e parallel -N0 -j64 sleep 1 :::: num128
491   /usr/bin/time -f %e parallel -N0 sleep 1 :::: num128
493   /usr/bin/time -f %e parallel -N0 --jobs 200% sleep 1 :::: num128
495   /usr/bin/time -f %e parallel -N0 --jobs 0 sleep 1 :::: num128
497   echo 50% > my_jobs
498   /usr/bin/time -f %e parallel -N0 --jobs my_jobs sleep 1 :::: num128 &
499   sleep 1
500   echo 0 > my_jobs
501   wait
502 parallel: Warning: Only enough file handles to run 248 jobs in parallel.
503 parallel: Warning: Try running 'parallel -j0 -N 248 --pipe parallel -j0'
504 parallel: Warning: or increasing 'ulimit -n' (try: ulimit -n `ulimit -Hn`)
505 parallel: Warning: or increasing 'nofile' in /etc/security/limits.conf
506 parallel: Warning: or increasing /proc/sys/fs/file-max
508   parallel --use-cpus-instead-of-cores -N0 sleep 1 :::: num8
509   parallel --shuf echo ::: 1 2 3 ::: a b c ::: A B C
510 123 abc ABC
511   seq 10 20 | parallel --tmux 'echo start {}; sleep {}; echo done {}'
512 See output with: tmux -S /tmp/parallel-tutorial-tmpdir/tmsXXXXX attach
513   tmux -S /tmp/tmsXXXXX attach
514 no sessions
515   parallel --delay 2.5 echo Starting {}\;date ::: 1 2 3
516 Starting 1
517 DATE OUTPUT
518 Starting 2
519 DATE OUTPUT
520 Starting 3
521 DATE OUTPUT
522   parallel --timeout 4.1 sleep {}\; echo {} ::: 2 4 6 8
524 parallel: Warning: This job was killed because it timed out:
525 parallel: Warning: sleep 6; echo 6
526 parallel: Warning: This job was killed because it timed out:
527 parallel: Warning: sleep 8; echo 8
528   parallel --timeout 200% sleep {}\; echo {} ::: 2.1 2.2 3 7 2.3
530 parallel: Warning: This job was killed because it timed out:
531 parallel: Warning: sleep 7; echo 7
532   parallel --eta sleep ::: 1 3 2 2 1 3 3 2 1
533 Computers / CPU cores / Max jobs to run
534 1:local / 8 / 8
535 Computer:jobs running/jobs completed/%of started jobs/Average seconds to complete
536   parallel --progress sleep ::: 1 3 2 2 1 3 3 2 1
537 Computers / CPU cores / Max jobs to run
538 1:local / 8 / 8
539 Computer:jobs running/jobs completed/%of started jobs/Average seconds to complete
540   seq 1000 | parallel -j10 --bar '(echo -n {};sleep 0.1)' \
541     2> >(perl -pe 'BEGIN{$/="\r";$|=1};s/\r/\n/g' |
542          zenity --timeout=15 --progress --auto-kill --auto-close)
543 BASE64--joblog /tmp/log exit  ::: 1 2 3 0
544   cat /tmp/log;
545   parallel --joblog /tmp/log exit  ::: 1 2 3 0
546   cat /tmp/log;  parallel --resume --joblog /tmp/log exit  ::: 1 2 3 0 0 0
547   cat /tmp/log;
548   parallel --resume-failed --joblog /tmp/log exit  ::: 1 2 3 0 0 0
549   cat /tmp/log;
550   parallel --retry-failed --joblog /tmp/log
551   cat /tmp/log;
552   parallel -j2 --halt soon,fail=1 echo {}\; exit {} ::: 0 0 1 2 3
553 Seq     Host    Starttime       JobRuntime      Send    Receive Exitval Signal  Command
554 1       :       TIMESTAMP       9.999   0       0       1       0       exit 1
555 2       :       TIMESTAMP       9.999   0       0       2       0       exit 2
556 3       :       TIMESTAMP       9.999   0       0       3       0       exit 3
557 4       :       TIMESTAMP       9.999   0       0       0       0       exit 0
558 Seq     Host    Starttime       JobRuntime      Send    Receive Exitval Signal  Command
559 1       :       TIMESTAMP       9.999   0       0       1       0       exit 1
560 2       :       TIMESTAMP       9.999   0       0       2       0       exit 2
561 3       :       TIMESTAMP       9.999   0       0       3       0       exit 3
562 4       :       TIMESTAMP       9.999   0       0       0       0       exit 0
563 Seq     Host    Starttime       JobRuntime      Send    Receive Exitval Signal  Command
564 1       :       TIMESTAMP       9.999   0       0       1       0       exit 1
565 2       :       TIMESTAMP       9.999   0       0       2       0       exit 2
566 3       :       TIMESTAMP       9.999   0       0       3       0       exit 3
567 4       :       TIMESTAMP       9.999   0       0       0       0       exit 0
568 5       :       TIMESTAMP       9.999   0       0       0       0       exit 0
569 6       :       TIMESTAMP       9.999   0       0       0       0       exit 0
570 Seq     Host    Starttime       JobRuntime      Send    Receive Exitval Signal  Command
571 1       :       TIMESTAMP       9.999   0       0       1       0       exit 1
572 2       :       TIMESTAMP       9.999   0       0       2       0       exit 2
573 3       :       TIMESTAMP       9.999   0       0       3       0       exit 3
574 4       :       TIMESTAMP       9.999   0       0       0       0       exit 0
575 5       :       TIMESTAMP       9.999   0       0       0       0       exit 0
576 6       :       TIMESTAMP       9.999   0       0       0       0       exit 0
577 1       :       TIMESTAMP       9.999   0       0       1       0       exit 1
578 2       :       TIMESTAMP       9.999   0       0       2       0       exit 2
579 3       :       TIMESTAMP       9.999   0       0       3       0       exit 3
580 Seq     Host    Starttime       JobRuntime      Send    Receive Exitval Signal  Command
581 1       :       TIMESTAMP       9.999   0       0       1       0       exit 1
582 2       :       TIMESTAMP       9.999   0       0       2       0       exit 2
583 3       :       TIMESTAMP       9.999   0       0       3       0       exit 3
584 4       :       TIMESTAMP       9.999   0       0       0       0       exit 0
585 5       :       TIMESTAMP       9.999   0       0       0       0       exit 0
586 6       :       TIMESTAMP       9.999   0       0       0       0       exit 0
587 1       :       TIMESTAMP       9.999   0       0       1       0       exit 1
588 2       :       TIMESTAMP       9.999   0       0       2       0       exit 2
589 3       :       TIMESTAMP       9.999   0       0       3       0       exit 3
590 1       :       TIMESTAMP       9.999   0       0       1       0       exit 1
591 2       :       TIMESTAMP       9.999   0       0       2       0       exit 2
592 3       :       TIMESTAMP       9.999   0       0       3       0       exit 3
594 parallel: This job failed:
595 echo X; exit X
596 parallel: Starting no more jobs. Waiting for 1 jobs to finish.
597 parallel: This job failed:
598 echo X; exit X
599   parallel -j2 --halt now,fail=1 echo {}\; exit {} ::: 0 0 1 2 3
601 parallel: This job failed:
602 echo X; exit X
603   parallel -j2 --halt soon,fail=20% echo {}\; exit {} \
604     ::: 0 1 2 3 4 5 6 7 8 9
606 parallel: This job failed:
607 echo X; exit X
608 parallel: This job failed:
609 echo X; exit X
610 parallel: Starting no more jobs. Waiting for 1 jobs to finish.
611 parallel: This job failed:
612 echo X; exit X
613   parallel -j2 --halt now,success=1 echo {}\; exit {} ::: 1 2 3 0 4 5 6
615 parallel: This job succeeded:
616 echo X; exit X
617   parallel -k --retries 3 \
618     'echo tried {} >>/tmp/runs; echo completed {}; exit {}' ::: 1 2 0
619   cat /tmp/runs
620 completed 1
621 completed 2
622 completed 0
623 tried 0
624   show_signals() {
625     perl -e 'for(keys %SIG) {
626         $SIG{$_} = eval "sub { print \"Got $_\\n\"; }";
627       }
628       while(1){sleep 1}'
629   }
630   export -f show_signals
631   echo | parallel --termseq TERM,200,TERM,100,TERM,50,KILL,25 \
632     -u --timeout 1 show_signals
633 parallel: Warning: This job was killed because it timed out:
634 parallel: Warning: show_signals ''
635   echo | parallel --termseq INT,200,TERM,100,KILL,25 \
636     -u --timeout 1 show_signals
637 /usr/bin/bash: show_signals: command not found
638   parallel --load 100% echo load is less than {} job per cpu ::: 1
639 load is less than 1 job per cpu
640   parallel --noswap echo the system is not swapping ::: now
641 the system is not swapping now
642   parallel --memfree 1G echo will run if more than 1 GB is ::: free
643 will run if more than 1 GB is free
644   parallel --nice 17 echo this is being run with nice -n ::: 17
645 this is being run with nice -n 17
646   parallel -S $SERVER1 echo running on ::: $SERVER1
647 running on parallel@lo
648   parallel -S $SERVER1 echo running on ::: username@$SERVER1
649 running on username@parallel@lo
650   parallel -S : echo running on ::: the_local_machine
651 running on the_local_machine
652   parallel -S '/usr/bin/ssh '$SERVER1 echo custom ::: ssh
653 custom ssh
654   parallel --ssh /usr/bin/ssh -S $SERVER1 echo custom ::: ssh
655 custom ssh
656   export PARALLEL_SSH=/usr/bin/ssh
657   parallel -S $SERVER1 echo custom ::: ssh
658 custom ssh
659   parallel -S $SERVER1 -S $SERVER2 echo ::: running on more hosts
660 running
662 more
663 hosts
664   echo $SERVER1 > nodefile
665   # Force 4 cores, special ssh-command, username
666   echo 4//usr/bin/ssh $SERVER2 >> nodefile
667   parallel --sshloginfile nodefile echo ::: running on more hosts
668 running
670 more
671 hosts
672   parallel -S 4/$SERVER1 echo force {} cpus on server ::: 4
673 force 4 cpus on server
674   parallel --hostgroup -S @grp1/$SERVER1 -S @grp2/$SERVER2 echo {} \
675     ::: run_on_grp1@grp1 run_on_grp2@grp2
676 run_on_grp1
677 run_on_grp2
678   echo This is input_file > input_file
679   parallel -S $SERVER1 --transferfile {} cat ::: input_file
680 This is input_file
681   echo This is input_file > input_file
682   parallel -S $SERVER1 --transferfile {} --return {}.out \
683     cat {} ">"{}.out ::: input_file
684   cat input_file.out
685 This is input_file
686   echo This is input_file > input_file
687   parallel -S $SERVER1 --transferfile {} --return {}.out --cleanup \
688     cat {} ">"{}.out ::: input_file
689   cat input_file.out
690 This is input_file
691   echo This is input_file > input_file
692   parallel -S $SERVER1 --trc {}.out cat {} ">"{}.out ::: input_file
693   cat input_file.out
694 This is input_file
695   echo common data > common_file
696   parallel --basefile common_file -S $SERVER1 \
697     cat common_file\; echo {} ::: foo
698 common data
700   parallel -S $SERVER1 pwd ::: ""
701   parallel --workdir . -S $SERVER1 pwd ::: ""
702   parallel --workdir ... -S $SERVER1 pwd ::: ""
703 /home/parallel
704 /home/parallel/.TMPWORKDIR
705   parallel -S $SERVER1 --sshdelay 0.2 echo ::: 1 2 3
707   parallel --controlmaster -S $SERVER1 echo ::: 1 2 3
709   parallel --filter-hosts -S 173.194.32.46,$SERVER1 echo ::: bar
711 parallel: Warning: Removed 173.194.32.46.
712   parallel --onall -S $SERVER1,$SERVER2 echo ::: foo bar
717   parallel --nonall --tag -S $SERVER1,$SERVER2 echo foo bar
718 csh@lo  foo bar
719 parallel@lo     foo bar
720   source `which env_parallel.bash`
721   alias myecho=echo
722   myvar="Joe's var is"
723   env_parallel -S $SERVER1 'myecho $myvar' ::: green
724 Unknown option: -S
725 Unknown option: parallel@lo
726 Unknown option: myecho $myvar
727 Unknown option: :::
728 Unknown option: green
729 env_parallel only works if it is a function.
730 Do this and restart your shell:
731 bash:  Put this in $HOME/.bashrc:  . `which env_parallel.bash`
732        E.g. by doing:  echo '. `which env_parallel.bash`' >> $HOME/.bashrc
733        Supports: variables, aliases, functions, arrays
734 fish:  Put this in $HOME/.config/fish/config.fish:  . (which env_parallel.fish)
735        E.g. by doing:
736          echo '. (which env_parallel.fish)' >> $HOME/.config/fish/config.fish
737        Supports: variables, aliases, functions, arrays
738 ksh:   Put this in $HOME/.kshrc:  source `which env_parallel.ksh`
739        E.g. by doing:  echo 'source `which env_parallel.ksh`' >> $HOME/.kshrc
740        Supports: variables, aliases, functions, arrays
741 mksh:  Put this in $HOME/.mkshrc:  source `which env_parallel.mksh`
742        E.g. by doing:  echo 'source `which env_parallel.mksh`' >> $HOME/.mkshrc
743        Supports: variables, aliases, functions, arrays
744 pdksh: Put this in $HOME/.profile:  source `which env_parallel.pdksh`
745        E.g. by doing:  echo '. `which env_parallel.pdksh`' >> $HOME/.profile
746        Supports: variables, aliases, functions, arrays
747 zsh:   Put this in $HOME/.zshrc:  . `which env_parallel.zsh`
748        E.g. by doing:  echo '. `which env_parallel.zsh`' >> $HOME/.zshenv
749        Supports: variables, functions, arrays
750 ash:   Put this in $HOME/.profile:  . `which env_parallel.ash`
751        E.g. by doing:  echo '. `which env_parallel.ash`' >> $HOME/.profile
752        Supports: variables, aliases
753 dash:  Put this in $HOME/.profile:  . `which env_parallel.dash`
754        E.g. by doing:  echo '. `which env_parallel.dash`' >> $HOME/.profile
755        Supports: variables, aliases
756 csh:   Put this in $HOME/.cshrc:  source `which env_parallel.csh`
757        E.g. by doing:  echo 'source `which env_parallel.csh`' >> $HOME/.cshrc
758        Supports: variables, aliases, arrays with no special chars
759 tcsh:  Put this in $HOME/.tcshrc:  source `which env_parallel.tcsh`
760        E.g. by doing:  echo 'source `which env_parallel.tcsh`' >> $HOME/.tcshrc
761        Supports: variables, aliases, arrays with no special chars
762 To install in all shells run:
763   env_parallel --install
764 For details: see  man env_parallel
765   MYVAR='foo bar'
766   export MYVAR
767   parallel --env MYVAR -S $SERVER1 echo '$MYVAR' ::: baz
768 foo bar baz
769   my_func() {
770     echo in my_func $1
771   }
772   export -f my_func
773   parallel --env my_func -S $SERVER1 my_func ::: baz
774 in my_func baz
775   parallel --record-env
776   cat ~/.parallel/ignored_vars|sort
777 BASH_FUNC_run_once%%
778 BASH_FUNC_run_test%%
780 mysqlrootpass
781 oracle_password
782 withpassword
783   # The function is only copied if using Bash
784   my_func2() {
785     echo in my_func2 $VAR $1
786   }
787   export -f my_func2
788   VAR=foo
789   export VAR
790   parallel --env _ -S $SERVER1 'echo $VAR; my_func2' ::: bar
791 script: my_func2: command not found
792   NOT='not exported var'
793   alias myecho=echo
794   not_ex() {
795     myecho in not_exported_func $NOT $1
796   }
797   env_parallel --env _ -S $SERVER1 'echo $NOT; not_ex' ::: bar
798 Unknown option: --env
799 Unknown option: _
800 Unknown option: -S
801 Unknown option: parallel@lo
802 Unknown option: echo $NOT; not_ex
803 Unknown option: :::
804 Unknown option: bar
805 env_parallel only works if it is a function.
806 Do this and restart your shell:
807 bash:  Put this in $HOME/.bashrc:  . `which env_parallel.bash`
808        E.g. by doing:  echo '. `which env_parallel.bash`' >> $HOME/.bashrc
809        Supports: variables, aliases, functions, arrays
810 fish:  Put this in $HOME/.config/fish/config.fish:  . (which env_parallel.fish)
811        E.g. by doing:
812          echo '. (which env_parallel.fish)' >> $HOME/.config/fish/config.fish
813        Supports: variables, aliases, functions, arrays
814 ksh:   Put this in $HOME/.kshrc:  source `which env_parallel.ksh`
815        E.g. by doing:  echo 'source `which env_parallel.ksh`' >> $HOME/.kshrc
816        Supports: variables, aliases, functions, arrays
817 mksh:  Put this in $HOME/.mkshrc:  source `which env_parallel.mksh`
818        E.g. by doing:  echo 'source `which env_parallel.mksh`' >> $HOME/.mkshrc
819        Supports: variables, aliases, functions, arrays
820 pdksh: Put this in $HOME/.profile:  source `which env_parallel.pdksh`
821        E.g. by doing:  echo '. `which env_parallel.pdksh`' >> $HOME/.profile
822        Supports: variables, aliases, functions, arrays
823 zsh:   Put this in $HOME/.zshrc:  . `which env_parallel.zsh`
824        E.g. by doing:  echo '. `which env_parallel.zsh`' >> $HOME/.zshenv
825        Supports: variables, functions, arrays
826 ash:   Put this in $HOME/.profile:  . `which env_parallel.ash`
827        E.g. by doing:  echo '. `which env_parallel.ash`' >> $HOME/.profile
828        Supports: variables, aliases
829 dash:  Put this in $HOME/.profile:  . `which env_parallel.dash`
830        E.g. by doing:  echo '. `which env_parallel.dash`' >> $HOME/.profile
831        Supports: variables, aliases
832 csh:   Put this in $HOME/.cshrc:  source `which env_parallel.csh`
833        E.g. by doing:  echo 'source `which env_parallel.csh`' >> $HOME/.cshrc
834        Supports: variables, aliases, arrays with no special chars
835 tcsh:  Put this in $HOME/.tcshrc:  source `which env_parallel.tcsh`
836        E.g. by doing:  echo 'source `which env_parallel.tcsh`' >> $HOME/.tcshrc
837        Supports: variables, aliases, arrays with no special chars
838 To install in all shells run:
839   env_parallel --install
840 For details: see  man env_parallel
841   parallel -vv --pipepart --block 1M wc :::: num30000
842 <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)
843   30000   30000  168894
844   my_func3() {
845     echo in my_func $1 > $1.out
846   }
847   export -f my_func3
848   parallel -vv --workdir ... --nice 17 --env _ --trc {}.out \
849     -S $SERVER1 my_func3 {} ::: abc-file
850 ssh -l parallel lo -- mkdir -p ./.TMPWORKDIR && rsync --protocol 30 -rlDzR -e'ssh -l parallel' ./abc-file lo:./.TMPWORKDIR;ssh -l parallel lo -- exec perl -X -e GNU_Parallel,eval+pack+q/H10000000/,join+q//,@ARGV BASE64;_EXIT_status=$?; mkdir -p ./. && rsync --protocol 30 --rsync-path='cd ./.TMPWORKDIR/./.; rsync' -rlDzR -e'ssh -l parallel' lo:./abc-file.out ./.;ssh -l parallel lo -- '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 -- '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 -- rm -rf .TMPWORKDIR;exit $_EXIT_status;
851   parset myvar1,myvar2 echo ::: a b
852   echo $myvar1
853   echo $myvar2
854 Unknown option: myvar1,myvar2
855 Unknown option: echo
856 Unknown option: :::
857 Unknown option: a
858 Unknown option: b
859 parset only works if it is a function. The function is defined as part
860 of env_parallel.
861 Do the below and restart your shell.
862 bash:  Put this in $HOME/.bashrc:  . `which env_parallel.bash`
863        E.g. by doing:  echo '. `which env_parallel.bash`' >> $HOME/.bashrc
864        Supports: variables, aliases, functions, arrays
865 ksh:   Put this in $HOME/.kshrc:  source `which env_parallel.ksh`
866        E.g. by doing:  echo 'source `which env_parallel.ksh`' >> $HOME/.kshrc
867        Supports: variables, aliases, functions, arrays
868 mksh:  Put this in $HOME/.mkshrc:  source `which env_parallel.mksh`
869        E.g. by doing:  echo 'source `which env_parallel.mksh`' >> $HOME/.mkshrc
870        Supports: variables, aliases, functions, arrays
871 pdksh: Put this in $HOME/.profile:  source `which env_parallel.pdksh`
872        E.g. by doing:  echo '. `which env_parallel.pdksh`' >> $HOME/.profile
873        Supports: variables, aliases, functions, arrays
874 zsh:   Put this in $HOME/.zshrc:  . `which env_parallel.zsh`
875        E.g. by doing:  echo '. `which env_parallel.zsh`' >> $HOME/.zshenv
876        Supports: variables, functions, arrays
877 ash:   Put this in $HOME/.profile:  . `which env_parallel.ash`
878        E.g. by doing:  echo '. `which env_parallel.ash`' >> $HOME/.profile
879        Supports: variables, aliases
880 dash:  Put this in $HOME/.profile:  . `which env_parallel.dash`
881        E.g. by doing:  echo '. `which env_parallel.dash`' >> $HOME/.profile
882        Supports: variables, aliases
883 fish:  Unsupported
884 csh:   Unsupported
885 tcsh:  Unsupported
886 To install in all shells run:
887   parset --install
888 For details: see  man parset
889   parset myarray seq {} 5 ::: 1 2 3
890   echo "${myarray[1]}"
891 Unknown option: myarray
892 Unknown option: seq
893 Unknown option: {}
894 Unknown option: 5
895 Unknown option: :::
896 Unknown option: 1
897 Unknown option: 2
898 Unknown option: 3
899 parset only works if it is a function. The function is defined as part
900 of env_parallel.
901 Do the below and restart your shell.
902 bash:  Put this in $HOME/.bashrc:  . `which env_parallel.bash`
903        E.g. by doing:  echo '. `which env_parallel.bash`' >> $HOME/.bashrc
904        Supports: variables, aliases, functions, arrays
905 ksh:   Put this in $HOME/.kshrc:  source `which env_parallel.ksh`
906        E.g. by doing:  echo 'source `which env_parallel.ksh`' >> $HOME/.kshrc
907        Supports: variables, aliases, functions, arrays
908 mksh:  Put this in $HOME/.mkshrc:  source `which env_parallel.mksh`
909        E.g. by doing:  echo 'source `which env_parallel.mksh`' >> $HOME/.mkshrc
910        Supports: variables, aliases, functions, arrays
911 pdksh: Put this in $HOME/.profile:  source `which env_parallel.pdksh`
912        E.g. by doing:  echo '. `which env_parallel.pdksh`' >> $HOME/.profile
913        Supports: variables, aliases, functions, arrays
914 zsh:   Put this in $HOME/.zshrc:  . `which env_parallel.zsh`
915        E.g. by doing:  echo '. `which env_parallel.zsh`' >> $HOME/.zshenv
916        Supports: variables, functions, arrays
917 ash:   Put this in $HOME/.profile:  . `which env_parallel.ash`
918        E.g. by doing:  echo '. `which env_parallel.ash`' >> $HOME/.profile
919        Supports: variables, aliases
920 dash:  Put this in $HOME/.profile:  . `which env_parallel.dash`
921        E.g. by doing:  echo '. `which env_parallel.dash`' >> $HOME/.profile
922        Supports: variables, aliases
923 fish:  Unsupported
924 csh:   Unsupported
925 tcsh:  Unsupported
926 To install in all shells run:
927   parset --install
928 For details: see  man parset
929   cmd=("echo '<<joe  \"double  space\"  cartoon>>'" "pwd")
930   parset data ::: "${cmd[@]}"
931   echo "${data[0]}"
932   echo "${data[1]}"
933 Unknown option: data
934 Unknown option: :::
935 Unknown option: echo '<<joe  "double  space"  cartoon>>'
936 Unknown option: pwd
937 parset only works if it is a function. The function is defined as part
938 of env_parallel.
939 Do the below and restart your shell.
940 bash:  Put this in $HOME/.bashrc:  . `which env_parallel.bash`
941        E.g. by doing:  echo '. `which env_parallel.bash`' >> $HOME/.bashrc
942        Supports: variables, aliases, functions, arrays
943 ksh:   Put this in $HOME/.kshrc:  source `which env_parallel.ksh`
944        E.g. by doing:  echo 'source `which env_parallel.ksh`' >> $HOME/.kshrc
945        Supports: variables, aliases, functions, arrays
946 mksh:  Put this in $HOME/.mkshrc:  source `which env_parallel.mksh`
947        E.g. by doing:  echo 'source `which env_parallel.mksh`' >> $HOME/.mkshrc
948        Supports: variables, aliases, functions, arrays
949 pdksh: Put this in $HOME/.profile:  source `which env_parallel.pdksh`
950        E.g. by doing:  echo '. `which env_parallel.pdksh`' >> $HOME/.profile
951        Supports: variables, aliases, functions, arrays
952 zsh:   Put this in $HOME/.zshrc:  . `which env_parallel.zsh`
953        E.g. by doing:  echo '. `which env_parallel.zsh`' >> $HOME/.zshenv
954        Supports: variables, functions, arrays
955 ash:   Put this in $HOME/.profile:  . `which env_parallel.ash`
956        E.g. by doing:  echo '. `which env_parallel.ash`' >> $HOME/.profile
957        Supports: variables, aliases
958 dash:  Put this in $HOME/.profile:  . `which env_parallel.dash`
959        E.g. by doing:  echo '. `which env_parallel.dash`' >> $HOME/.profile
960        Supports: variables, aliases
961 fish:  Unsupported
962 csh:   Unsupported
963 tcsh:  Unsupported
964 To install in all shells run:
965   parset --install
966 For details: see  man parset
967   parallel --sqlandworker csv:///%2Ftmp/log.csv \
968     seq ::: 10 ::: 12 13 14
969   cat /tmp/log.csv
971 Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr\r
972 1,:,000000000.000,0.000,0,9,0,0,"seq 10 12",10,12,"10
974 ",\r
975 2,:,000000000.000,0.000,0,12,0,0,"seq 10 13",10,13,"10
977 ",\r
978 3,:,000000000.000,0.000,0,15,0,0,"seq 10 14",10,14,"10
980 ",\r
981   parallel --results outdir --sqlandworker csv:///%2Ftmp/log2.csv \
982     seq ::: 10 ::: 12 13 14
983   cat /tmp/log2.csv
984 Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr\r
985 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\r
986 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\r
987 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\r
988   vendor://[[user][:password]@][host][:port]/[database[/table]
989 /usr/bin/bash: vendor://[[user][:password]@][host][:port]/[database[/table]: No such file or directory
990   sqlite3:///%2Ftmp%2Fmydatabase/mytable
991   csv:///%2Ftmp/log.csv
992 /usr/bin/bash: sqlite3:///%2Ftmp%2Fmydatabase/mytable: No such file or directory
993 /usr/bin/bash: line 1: csv:///%2Ftmp/log.csv: No such file or directory
994   DBURL=sqlite3:///%2Ftmp%2Fmydatabase
995   DBURLTABLE=$DBURL/mytable
996   parallel --sqlandworker $DBURLTABLE echo ::: foo bar ::: baz quuz
997 foo baz
998 foo quuz
999 bar baz
1000 bar quuz
1001   sql $DBURL 'SELECT * FROM mytable ORDER BY Seq;'
1002 Error:
1003 SELECT * FROM mytable ORDER BY Seq; is not a valid DBURL
1004 sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command]
1005   parallel --sqlmaster $DBURLTABLE echo ::: foo bar ::: baz quuz
1006 parallel: Error: echo is not a valid DBURL
1007   parallel --sqlworker $DBURLTABLE echo ::: foo bar ::: baz quuz
1008 parallel: Error: echo is not a valid DBURL
1009   cat num1000000 | parallel --pipe wc
1010  999999  999999 9999999
1011   85352   85352  597465
1012   cat num1000000 | parallel --pipe --block 2M wc
1013  999999  999999 9999999
1014   85349   85349  597444
1015   cat num1000000 | parallel --pipe -j4 --roundrobin wc
1016  999999  999999 9999999
1017   cat num1000000 | parallel --pipe -N140000 wc
1018  140000  140000  868895
1019  140000  140000  980000
1020   20000   20000  140001
1021   cat num1000000 | parallel --pipe -L75 wc
1022  999999  999999 9999999
1023   85500   85500  598500
1024      25      25     176
1025   cat fixedlen | parallel --pipe --header .{4} --block 3 --recend '' \
1026     'echo start; cat; echo'
1027 start
1028   echo /foo, bar/, /baz, qux/, | \
1029     parallel -kN1 --recend ', ' --pipe echo JOB{#}\;cat\;echo END
1030 /foo, END
1031 bar/, END
1032 /baz, END
1033 qux/,
1034   echo /foo, bar/, /baz, qux/, | \
1035     parallel -kN1 --recstart / --pipe echo JOB{#}\;cat\;echo END
1036 /foo, barEND
1037 /, END
1038 /baz, quxEND
1040   echo /foo, bar/, /baz, qux/, | \
1041     parallel -kN1 --recend ', ' --recstart / --pipe \
1042     echo JOB{#}\;cat\;echo END
1043 /foo, bar/, END
1044 /baz, qux/,
1045   echo foo,bar,_baz,__qux, | \
1046     parallel -kN1 --regexp --recend ,_+ --pipe \
1047     echo JOB{#}\;cat\;echo END
1048 foo,bar,_END
1049 baz,__END
1050 qux,
1051   echo foo,bar,_baz,__qux, | \
1052     parallel -kN1 --rrs --regexp --recend ,_+ --pipe \
1053     echo JOB{#}\;cat\;echo END
1054 foo,barEND
1055 bazEND
1056 qux,
1057   cat num_%header | \
1058     parallel --header '(%.*\n)*' --pipe -N3 echo JOB{#}\;cat
1059 cat: num_%header: No such file or directory
1060   cat num_%header | parallel --header 2 --pipe -N3 echo JOB{#}\;cat
1061 cat: num_%header: No such file or directory
1062   parallel --pipepart -a num1000000 --block 3m wc
1063  999999  999999 9999999
1064  126984  126984  888889
1065   cat input_file | parallel command
1066 /usr/bin/bash: This is input_file: command not found
1067   #!/bin/bash
1068   #!/usr/bin/parallel --shebang -r echo
1069   foo
1070   bar
1071   baz
1072 /usr/bin/bash: foo: command not found
1073 /usr/bin/bash: line 1: bar: command not found
1074 /usr/bin/bash: line 2: baz: command not found
1075   cat input_file | parallel command
1076   parallel command ::: foo bar
1077 /usr/bin/bash: This is input_file: command not found
1078 /usr/bin/bash: foo: command not found
1079 /usr/bin/bash: bar: command not found
1080   cat input_file | command
1081   command foo bar
1082 /usr/bin/bash: line 1: foo: command not found
1083   #!/usr/bin/perl
1084   print "@ARGV\n"
1085 Error: no such file "@ARGV\n"
1086   parallel perl_echo ::: foo bar
1087 /usr/bin/bash: perl_echo: command not found
1088   #!/usr/bin/parallel --shebang-wrap /usr/bin/perl
1089   print "@ARGV\n"
1090 Error: no such file "@ARGV\n"
1091   perl_echo foo bar
1092 /usr/bin/bash: perl_echo: command not found
1093   #!/usr/bin/parallel --shebang-wrap /usr/bin/perl
1094   print "Arguments @ARGV\n";
1095 Error: no such file "Arguments @ARGV\n"
1096   #!/usr/bin/parallel --shebang-wrap /usr/bin/python
1097   print 'Arguments', str(sys.argv)
1098 /usr/bin/bash: -c: line 3: syntax error near unexpected token `('
1099 /usr/bin/bash: -c: line 3: `  print 'Arguments', str(sys.argv)'
1100   #!/usr/bin/parallel --shebang-wrap /bin/bash
1101   echo Arguments "$@"
1102 Arguments
1103   #!/usr/bin/parallel --shebang-wrap /bin/csh
1104   echo Arguments "$argv"
1105 Arguments 
1106   #!/usr/bin/parallel --shebang-wrap /usr/bin/tclsh
1107   puts "Arguments $argv"
1108 /usr/bin/bash: line 2: puts: command not found
1109   #!/usr/bin/parallel --shebang-wrap /usr/bin/Rscript --vanilla --slave
1110   args <- commandArgs(trailingOnly = TRUE)
1111   print(paste("Arguments ",args))
1112 /usr/bin/bash: -c: line 2: syntax error near unexpected token `('
1113 /usr/bin/bash: -c: line 2: `  args <- commandArgs(trailingOnly = TRUE)'
1114   #!/usr/bin/parallel --shebang-wrap ARG={} /usr/bin/gnuplot
1115   print "Arguments ", system('echo $ARG')
1116 /usr/bin/bash: -c: line 2: syntax error near unexpected token `('
1117 /usr/bin/bash: -c: line 2: `  print "Arguments ", system('echo $ARG')'
1118   #!/usr/bin/parallel --shebang-wrap /usr/bin/ruby
1119   print "Arguments "
1120   puts ARGV
1121 Error: no such file "Arguments "
1122 /usr/bin/bash: line 3: puts: command not found
1123   #!/usr/bin/parallel --shebang-wrap /usr/bin/octave
1124   printf ("Arguments");
1125   arg_list = argv ();
1126   for i = 1:nargin
1127     printf (" %s", arg_list{i});
1128   endfor
1129   printf ("\n");
1130 /usr/bin/bash: -c: line 2: syntax error near unexpected token `"Arguments"'
1131 /usr/bin/bash: -c: line 2: `  printf ("Arguments");'
1132   #!/usr/bin/parallel --shebang-wrap /usr/bin/clisp
1133   (format t "~&~S~&" 'Arguments)
1134   (format t "~&~S~&" *args*)
1135 /usr/bin/bash: -c: line 2: unexpected EOF while looking for matching `''
1136 /usr/bin/bash: -c: line 4: syntax error: unexpected end of file
1137   #!/usr/bin/parallel --shebang-wrap /usr/bin/php
1138   <?php
1139   echo "Arguments";
1140   foreach(array_slice($argv,1) as $v)
1141   {
1142     echo " $v";
1143   }
1144   echo "\n";
1145   ?>
1146 Arguments
1147 /usr/bin/bash: line 1: ?php: No such file or directory
1148 /usr/bin/bash: -c: line 3: syntax error near unexpected token `array_slice'
1149 /usr/bin/bash: -c: line 3: `  foreach(array_slice($argv,1) as $v)'
1150   #!/usr/bin/parallel --shebang-wrap /usr/bin/node
1151   var myArgs = process.argv.slice(2);
1152   console.log('Arguments ', myArgs);
1153 /usr/bin/bash: -c: line 0: syntax error near unexpected token `('
1154 /usr/bin/bash: -c: line 0: `  var myArgs = process.argv.slice(2);'
1155   #!/usr/bin/parallel --shebang-wrap /usr/bin/lua
1156   io.write "Arguments"
1157   for a = 1, #arg do
1158     io.write(" ")
1159     io.write(arg[a])
1160   end
1161   print("")
1162 /usr/bin/bash: line 2: io.write: command not found
1163 /usr/bin/bash: -c: line 3: syntax error near unexpected token `='
1164 /usr/bin/bash: -c: line 3: `  for a = 1, #arg do'
1165   #!/usr/bin/parallel --shebang-wrap ARGV={} /usr/bin/csharp
1166   var argv = Environment.GetEnvironmentVariable("ARGV");
1167   print("Arguments "+argv);
1168 /usr/bin/bash: -c: line 2: syntax error near unexpected token `('
1169 /usr/bin/bash: -c: line 2: `  var argv = Environment.GetEnvironmentVariable("ARGV");'
1170   sem 'sleep 1; echo The first finished' &&
1171     echo The first is now running in the background &&
1172     sem 'sleep 1; echo The second finished' &&
1173     echo The second is now running in the background
1174   sem --wait
1175 The first is now running in the background
1176 The first finished
1177 The second is now running in the background
1178   sem --fg 'sleep 1; echo The first finished' &&
1179     echo The first finished running in the foreground &&
1180     sem --fg 'sleep 1; echo The second finished' &&
1181     echo The second finished running in the foreground
1182   sem --wait
1183 The first finished
1184 The first finished running in the foreground
1185 The second finished running in the foreground
1186   sem --id my_id -u 'echo First started; sleep 10; echo First done'
1187 First started
1188 First done
1189   sem --id my_id -u 'echo Second started; sleep 10; echo Second done'
1190   sem --jobs 3 --id my_id -u 'echo Start 1; sleep 5; echo 1 done' &&
1191   sem --jobs 3 --id my_id -u 'echo Start 2; sleep 6; echo 2 done' &&
1192   sem --jobs 3 --id my_id -u 'echo Start 3; sleep 7; echo 3 done' &&
1193   sem --jobs 3 --id my_id -u 'echo Start 4; sleep 8; echo 4 done' &&
1194   sem --wait --id my_id
1195 Start 1
1196 Start 2
1197 1 done
1198 Start 3
1199 2 done
1200 Start 4
1201 3 done
1202 4 done
1203   sem --id foo -u 'echo Slow started; sleep 5; echo Slow ended' &&
1204   sem --id foo --semaphoretimeout 1 'echo Forced running after 1 sec' &&
1205   sem --id foo --semaphoretimeout -2 'echo Give up after 2 secs'
1206   sem --id foo --wait
1207 Slow started
1208 Forced running after 1 sec
1209 Slow ended
1210 parallel: Warning: Semaphore timed out. Stealing the semaphore.
1211 parallel: Warning: Semaphore timed out. Exiting.
1212   parallel --help
1213 Usage:
1214 parallel [options] [command [arguments]] < list_of_arguments
1215 parallel [options] [command [arguments]] (::: arguments|:::: argfile(s))...
1216 cat ... | parallel --pipe [options] [command [arguments]]
1217 -j n            Run n jobs in parallel
1218 -k              Keep same order
1219 -X              Multiple arguments with context replace
1220 --colsep regexp Split input on regexp for positional replacements
1221 {} {.} {/} {/.} {#} {%} {= perl code =} Replacement strings
1222 {3} {3.} {3/} {3/.} {=3 perl code =}    Positional replacement strings
1223 With --plus:    {} = {+/}/{/} = {.}.{+.} = {+/}/{/.}.{+.} = {..}.{+..} =
1224                 {+/}/{/..}.{+..} = {...}.{+...} = {+/}/{/...}.{+...}
1225 -S sshlogin     Example: foo@server.example.com
1226 --slf ..        Use ~/.parallel/sshloginfile as the list of sshlogins
1227 --trc {}.bar    Shorthand for --transfer --return {}.bar --cleanup
1228 --onall         Run the given command with argument on all sshlogins
1229 --nonall        Run the given command with no arguments on all sshlogins
1230 --pipe          Split stdin (standard input) to multiple jobs.
1231 --recend str    Record end separator for --pipe.
1232 --recstart str  Record start separator for --pipe.
1233 GNU Parallel can do much more. See 'man parallel' for details
1234 Academic tradition requires you to cite works you base your article on.
1235 If you use programs that use GNU Parallel to process data for an article in a
1236 scientific publication, please cite:
1237   
1238   Zenodo. 
1239 This helps funding further development; AND IT WON'T COST YOU A CENT.
1240 If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
1241   parallel --version
1242 GNU parallel VERSION
1243 Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software
1244 Foundation, Inc.
1245 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
1246 This is free software: you are free to change and redistribute it.
1247 GNU parallel comes with no warranty.
1248 Web site: https://www.gnu.org/software/parallel
1249 When using programs that use GNU Parallel to process data for publication
1250 please cite as described in 'parallel --citation'.
1251   parallel --minversion VERSION && \
1252     echo Your version is at least VERSION.
1253 Your version is at least VERSION.
1254   parallel --citation
1255 Academic tradition requires you to cite works you base your article on.
1256 If you use programs that use GNU Parallel to process data for an article in a
1257 scientific publication, please cite:
1259       author       = {Tange, Ole},
1260       
1261       year         = 2021,
1262       note         = {{GNU Parallel is a general parallelizer to run
1263                        multiple serial command line programs in parallel
1264                        without changing them.}},
1265       publisher    = {Zenodo},
1266       
1267       url          = {
1270 This helps funding further development; AND IT WON'T COST YOU A CENT.
1271 If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
1272 More about funding GNU Parallel and the citation notice:
1273 https://lists.gnu.org/archive/html/parallel/2013-11/msg00006.html
1274 https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice
1275 https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
1276 If you send a copy of your published article to tange@gnu.org, it will be
1277 mentioned in the release notes of next version of GNU Parallel.
1278   parallel --number-of-cpus
1279   parallel --number-of-cores
1281   echo '--nice 17' > ~/.parallel/nicetimeout
1282   echo '--timeout 300%' >> ~/.parallel/nicetimeout
1283   parallel --profile nicetimeout echo ::: A B C
1284   echo '-vv --dry-run' > ~/.parallel/dryverbose
1285   parallel --profile dryverbose --profile nicetimeout echo ::: A B C
1286 echo A
1287 echo B
1288 echo C