1 ### test parallel_tutorial
2 fetch -o - http://pi.dk/3 ) > install.sh
4 12345678 3374ec53 bacb199b 245af2dd a86df6c9
6 029a9ac0 6e8b5bc6 052eac57 b2c3c9ca
8 40f53af6 9e20dae5 713ba06c f517006d 9897747b ed8a4694 b1acba1b 1464beb4
9 60055629 3f2356f3 3e9c4e3c 76e3f3af a9db4b32 bd33322b 975696fc e6b23cfb
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; \
24 /usr/bin/bash: -c: line 2: syntax error: unexpected end of file
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
43 parallel -a abc-file -a def-file echo
53 cat abc-file | parallel -a - -a def-file echo
63 cat abc-file | parallel echo :::: - def-file
73 parallel echo ::: A B C :::: def-file
83 parallel --link echo ::: A B C ::: D E F
87 parallel --link echo ::: A B C D E ::: F G
93 parallel echo :::: abc-file :::+ G H I :::: def-file
103 parallel echo :::: abc-file ::: G H I ::::+ def-file
113 parallel echo ::: A B C D E :::+ F G
116 parallel --arg-sep ,, echo ,, A B C :::: def-file
126 parallel --arg-file-sep // echo ::: A B C // def-file
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
158 parallel my_func ::: 1 2 3
162 parallel echo ::: A/B.C
164 parallel echo {} ::: 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
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}
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}
208 parallel --parens ,,,, echo ',, s:\.[^.]+$::;s:\.[^.]+$::; ,,' \
211 parallel --rpl '.. s:\.[^.]+$::;s:\.[^.]+$::;' echo '..' \
214 parallel --rpl '{..} s:\.[^.]+$::;s:\.[^.]+$::;' echo '{..}'
216 /usr/bin/bash: line 1: :::: command not found
217 parallel --rpl '{%(.+?)} s/$$1$//;' echo {%.tar.gz}.zip ::: foo.tar.gz
219 parallel --rpl '{/(.+?)/(.*?)} s/$$1/$$2/;' echo {/tar.gz/zip} \
223 --rpl '{#} $_=$job->seq()'
224 --rpl '{%} $_=$job->slot()'
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
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
258 parallel --rpl '{..} s:\.[^.]+$::;s:\.[^.]+$::;' echo '{2..} {1}' \
259 ::: bar ::: foo.tar.gz
261 parallel --colsep '\t' echo 1={1} 2={2} :::: tsv-file.tsv
265 parallel --header : echo f1={f1} f2={f2} ::: f1 A B ::: f2 C D
270 parallel --header : --colsep '\t' echo f1={f1} f2={f2} \
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}
291 parallel --plus echo {:-myval} ::: "$myvar"
295 parallel --plus echo {:2} ::: "$myvar"
298 parallel --plus echo {:2:3} ::: "$myvar"
300 parallel --plus echo {#bc} ::: "$myvar"
302 parallel --plus echo {#abc} ::: "$myvar"
304 parallel --plus echo {%de} ::: "$myvar"
306 parallel --plus echo {%def} ::: "$myvar"
307 echo ${myvar/def/ghi}
308 parallel --plus echo {/def/ghi} ::: "$myvar"
310 parallel --plus echo {^a} ::: "$myvar"
312 parallel --plus echo {^^a} ::: "$myvar"
315 parallel --plus echo '{,A}' ::: "$myvar"
317 parallel --plus echo '{,,A}' ::: "$myvar"
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
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
336 parallel -N3 echo ::: A B C D E F G H
340 parallel -N3 echo 1={1} 2={2} 3={3} ::: A B C D E F G H
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"'
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 '
359 parallel --trim l echo pre-{}-post ::: ' A '
361 parallel --trim lr echo pre-{}-post ::: ' A '
363 parallel echo \={} ::: zsh bash ls
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
392 parallel --tagstring {}-bar echo foo-{} ::: A B C
396 parallel --dryrun echo {} ::: A B C
400 parallel --verbose echo {} ::: A B C
404 parallel -j2 'printf "%s-start\n%s" {} {};
405 sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
413 parallel -j2 --ungroup 'printf "%s-start\n%s" {} {};
414 sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
423 parallel -j2 --linebuffer 'printf "%s-start\n%s" {} {};
424 sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
432 parallel -j2 -k 'printf "%s-start\n%s" {} {};
433 sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
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
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
466 outdir/f1/A/f2/C/stderr
467 outdir/f1/A/f2/C/stdout
469 outdir/f1/A/f2/D/stderr
470 outdir/f1/A/f2/D/stdout
472 outdir/f1/B/f2/C/stderr
473 outdir/f1/B/f2/C/stdout
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
498 /usr/bin/time -f %e parallel -N0 --jobs my_jobs sleep 1 :::: num128 &
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
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
515 parallel --delay 2.5 echo Starting {}\;date ::: 1 2 3
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
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
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
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
548 parallel --resume-failed --joblog /tmp/log exit ::: 1 2 3 0 0 0
550 parallel --retry-failed --joblog /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:
596 parallel: Starting no more jobs. Waiting for 1 jobs to finish.
597 parallel: This job failed:
599 parallel -j2 --halt now,fail=1 echo {}\; exit {} ::: 0 0 1 2 3
601 parallel: This job failed:
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:
608 parallel: This job failed:
610 parallel: Starting no more jobs. Waiting for 1 jobs to finish.
611 parallel: This job failed:
613 parallel -j2 --halt now,success=1 echo {}\; exit {} ::: 1 2 3 0 4 5 6
615 parallel: This job succeeded:
617 parallel -k --retries 3 \
618 'echo tried {} >>/tmp/runs; echo completed {}; exit {}' ::: 1 2 0
625 perl -e 'for(keys %SIG) {
626 $SIG{$_} = eval "sub { print \"Got $_\\n\"; }";
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
654 parallel --ssh /usr/bin/ssh -S $SERVER1 echo custom ::: ssh
656 export PARALLEL_SSH=/usr/bin/ssh
657 parallel -S $SERVER1 echo custom ::: ssh
659 parallel -S $SERVER1 -S $SERVER2 echo ::: running on more 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
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
678 echo This is input_file > input_file
679 parallel -S $SERVER1 --transferfile {} cat ::: input_file
681 echo This is input_file > input_file
682 parallel -S $SERVER1 --transferfile {} --return {}.out \
683 cat {} ">"{}.out ::: input_file
686 echo This is input_file > input_file
687 parallel -S $SERVER1 --transferfile {} --return {}.out --cleanup \
688 cat {} ">"{}.out ::: input_file
691 echo This is input_file > input_file
692 parallel -S $SERVER1 --trc {}.out cat {} ">"{}.out ::: input_file
695 echo common data > common_file
696 parallel --basefile common_file -S $SERVER1 \
697 cat common_file\; echo {} ::: foo
700 parallel -S $SERVER1 pwd ::: ""
701 parallel --workdir . -S $SERVER1 pwd ::: ""
702 parallel --workdir ... -S $SERVER1 pwd ::: ""
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
720 source `which env_parallel.bash`
723 env_parallel -S $SERVER1 'myecho $myvar' ::: green
725 Unknown option: parallel@lo
726 Unknown option: myecho $myvar
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)
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
767 parallel --env MYVAR -S $SERVER1 echo '$MYVAR' ::: baz
773 parallel --env my_func -S $SERVER1 my_func ::: baz
775 parallel --record-env
776 cat ~/.parallel/ignored_vars|sort
783 # The function is only copied if using Bash
785 echo in my_func2 $VAR $1
790 parallel --env _ -S $SERVER1 'echo $VAR; my_func2' ::: bar
791 script: my_func2: command not found
792 NOT='not exported var'
795 myecho in not_exported_func $NOT $1
797 env_parallel --env _ -S $SERVER1 'echo $NOT; not_ex' ::: bar
798 Unknown option: --env
801 Unknown option: parallel@lo
802 Unknown option: echo $NOT; not_ex
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)
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)
845 echo in my_func $1 > $1.out
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
854 Unknown option: myvar1,myvar2
859 parset only works if it is a function. The function is defined as part
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
886 To install in all shells run:
888 For details: see man parset
889 parset myarray seq {} 5 ::: 1 2 3
891 Unknown option: myarray
899 parset only works if it is a function. The function is defined as part
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
926 To install in all shells run:
928 For details: see man parset
929 cmd=("echo '<<joe \"double space\" cartoon>>'" "pwd")
930 parset data ::: "${cmd[@]}"
935 Unknown option: echo '<<joe "double space" cartoon>>'
937 parset only works if it is a function. The function is defined as part
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
964 To install in all shells run:
966 For details: see man parset
967 parallel --sqlandworker csv:///%2Ftmp/log.csv \
968 seq ::: 10 ::: 12 13 14
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
975 2,:,000000000.000,0.000,0,12,0,0,"seq 10 13",10,13,"10
978 3,:,000000000.000,0.000,0,15,0,0,"seq 10 14",10,14,"10
981 parallel --results outdir --sqlandworker csv:///%2Ftmp/log2.csv \
982 seq ::: 10 ::: 12 13 14
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
1001 sql $DBURL 'SELECT * FROM mytable ORDER BY Seq;'
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
1012 cat num1000000 | parallel --pipe --block 2M wc
1013 999999 999999 9999999
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
1021 cat num1000000 | parallel --pipe -L75 wc
1022 999999 999999 9999999
1025 cat fixedlen | parallel --pipe --header .{4} --block 3 --recend '' \
1026 'echo start; cat; echo'
1028 echo /foo, bar/, /baz, qux/, | \
1029 parallel -kN1 --recend ', ' --pipe echo JOB{#}\;cat\;echo END
1034 echo /foo, bar/, /baz, qux/, | \
1035 parallel -kN1 --recstart / --pipe echo JOB{#}\;cat\;echo END
1040 echo /foo, bar/, /baz, qux/, | \
1041 parallel -kN1 --recend ', ' --recstart / --pipe \
1042 echo JOB{#}\;cat\;echo END
1045 echo foo,bar,_baz,__qux, | \
1046 parallel -kN1 --regexp --recend ,_+ --pipe \
1047 echo JOB{#}\;cat\;echo END
1051 echo foo,bar,_baz,__qux, | \
1052 parallel -kN1 --rrs --regexp --recend ,_+ --pipe \
1053 echo JOB{#}\;cat\;echo END
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
1068 #!/usr/bin/parallel --shebang -r echo
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
1082 /usr/bin/bash: line 1: foo: command not found
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
1090 Error: no such file "@ARGV\n"
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
1103 #!/usr/bin/parallel --shebang-wrap /bin/csh
1104 echo Arguments "$argv"
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
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");
1127 printf (" %s", arg_list{i});
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
1140 foreach(array_slice($argv,1) as $v)
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"
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
1175 The first is now running in the background
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
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'
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
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'
1208 Forced running after 1 sec
1210 parallel: Warning: Semaphore timed out. Stealing the semaphore.
1211 parallel: Warning: Semaphore timed out. Exiting.
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
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:
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.
1242 GNU parallel VERSION
1243 Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software
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.
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},
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},
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