-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparallel_alternatives.7
3851 lines (3851 loc) · 129 KB
/
parallel_alternatives.7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.40)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "PARALLEL_ALTERNATIVES 7"
.TH PARALLEL_ALTERNATIVES 7 "2021-03-21" "20210222" "parallel"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
parallel_alternatives \- Alternatives to GNU parallel
.SH "DIFFERENCES BETWEEN GNU Parallel AND ALTERNATIVES"
.IX Header "DIFFERENCES BETWEEN GNU Parallel AND ALTERNATIVES"
There are a lot programs with some of the functionality of \s-1GNU\s0
\&\fBparallel\fR. \s-1GNU\s0 \fBparallel\fR strives to include the best of the
functionality without sacrificing ease of use.
.PP
\&\fBparallel\fR has existed since 2002 and as \s-1GNU\s0 \fBparallel\fR since
2010. A lot of the alternatives have not had the vitality to survive
that long, but have come and gone during that time.
.PP
\&\s-1GNU\s0 \fBparallel\fR is actively maintained with a new release every month
since 2010. Most other alternatives are fleeting interests of the
developers with irregular releases and only maintained for a few
years.
.SS "\s-1SUMMARY LEGEND\s0"
.IX Subsection "SUMMARY LEGEND"
The following features are in some of the comparable tools:
.PP
\fIInputs\fR
.IX Subsection "Inputs"
.IP "I1. Arguments can be read from stdin" 4
.IX Item "I1. Arguments can be read from stdin"
.PD 0
.IP "I2. Arguments can be read from a file" 4
.IX Item "I2. Arguments can be read from a file"
.IP "I3. Arguments can be read from multiple files" 4
.IX Item "I3. Arguments can be read from multiple files"
.IP "I4. Arguments can be read from command line" 4
.IX Item "I4. Arguments can be read from command line"
.IP "I5. Arguments can be read from a table" 4
.IX Item "I5. Arguments can be read from a table"
.IP "I6. Arguments can be read from the same file using #! (shebang)" 4
.IX Item "I6. Arguments can be read from the same file using #! (shebang)"
.IP "I7. Line oriented input as default (Quoting of special chars not needed)" 4
.IX Item "I7. Line oriented input as default (Quoting of special chars not needed)"
.PD
.PP
\fIManipulation of input\fR
.IX Subsection "Manipulation of input"
.IP "M1. Composed command" 4
.IX Item "M1. Composed command"
.PD 0
.IP "M2. Multiple arguments can fill up an execution line" 4
.IX Item "M2. Multiple arguments can fill up an execution line"
.IP "M3. Arguments can be put anywhere in the execution line" 4
.IX Item "M3. Arguments can be put anywhere in the execution line"
.IP "M4. Multiple arguments can be put anywhere in the execution line" 4
.IX Item "M4. Multiple arguments can be put anywhere in the execution line"
.IP "M5. Arguments can be replaced with context" 4
.IX Item "M5. Arguments can be replaced with context"
.IP "M6. Input can be treated as the complete command line" 4
.IX Item "M6. Input can be treated as the complete command line"
.PD
.PP
\fIOutputs\fR
.IX Subsection "Outputs"
.IP "O1. Grouping output so output from different jobs do not mix" 4
.IX Item "O1. Grouping output so output from different jobs do not mix"
.PD 0
.IP "O2. Send stderr (standard error) to stderr (standard error)" 4
.IX Item "O2. Send stderr (standard error) to stderr (standard error)"
.IP "O3. Send stdout (standard output) to stdout (standard output)" 4
.IX Item "O3. Send stdout (standard output) to stdout (standard output)"
.IP "O4. Order of output can be same as order of input" 4
.IX Item "O4. Order of output can be same as order of input"
.IP "O5. Stdout only contains stdout (standard output) from the command" 4
.IX Item "O5. Stdout only contains stdout (standard output) from the command"
.IP "O6. Stderr only contains stderr (standard error) from the command" 4
.IX Item "O6. Stderr only contains stderr (standard error) from the command"
.IP "O7. Buffering on disk" 4
.IX Item "O7. Buffering on disk"
.IP "O8. Cleanup of temporary files if killed" 4
.IX Item "O8. Cleanup of temporary files if killed"
.IP "O9. Test if disk runs full during run" 4
.IX Item "O9. Test if disk runs full during run"
.IP "O10. Output of a line bigger than 4 \s-1GB\s0" 4
.IX Item "O10. Output of a line bigger than 4 GB"
.PD
.PP
\fIExecution\fR
.IX Subsection "Execution"
.IP "E1. Running jobs in parallel" 4
.IX Item "E1. Running jobs in parallel"
.PD 0
.IP "E2. List running jobs" 4
.IX Item "E2. List running jobs"
.IP "E3. Finish running jobs, but do not start new jobs" 4
.IX Item "E3. Finish running jobs, but do not start new jobs"
.IP "E4. Number of running jobs can depend on number of cpus" 4
.IX Item "E4. Number of running jobs can depend on number of cpus"
.IP "E5. Finish running jobs, but do not start new jobs after first failure" 4
.IX Item "E5. Finish running jobs, but do not start new jobs after first failure"
.IP "E6. Number of running jobs can be adjusted while running" 4
.IX Item "E6. Number of running jobs can be adjusted while running"
.IP "E7. Only spawn new jobs if load is less than a limit" 4
.IX Item "E7. Only spawn new jobs if load is less than a limit"
.PD
.PP
\fIRemote execution\fR
.IX Subsection "Remote execution"
.IP "R1. Jobs can be run on remote computers" 4
.IX Item "R1. Jobs can be run on remote computers"
.PD 0
.IP "R2. Basefiles can be transferred" 4
.IX Item "R2. Basefiles can be transferred"
.IP "R3. Argument files can be transferred" 4
.IX Item "R3. Argument files can be transferred"
.IP "R4. Result files can be transferred" 4
.IX Item "R4. Result files can be transferred"
.IP "R5. Cleanup of transferred files" 4
.IX Item "R5. Cleanup of transferred files"
.IP "R6. No config files needed" 4
.IX Item "R6. No config files needed"
.IP "R7. Do not run more than \s-1SSHD\s0's MaxStartups can handle" 4
.IX Item "R7. Do not run more than SSHD's MaxStartups can handle"
.IP "R8. Configurable \s-1SSH\s0 command" 4
.IX Item "R8. Configurable SSH command"
.IP "R9. Retry if connection breaks occasionally" 4
.IX Item "R9. Retry if connection breaks occasionally"
.PD
.PP
\fISemaphore\fR
.IX Subsection "Semaphore"
.IP "S1. Possibility to work as a mutex" 4
.IX Item "S1. Possibility to work as a mutex"
.PD 0
.IP "S2. Possibility to work as a counting semaphore" 4
.IX Item "S2. Possibility to work as a counting semaphore"
.PD
.PP
\fILegend\fR
.IX Subsection "Legend"
.IP "\- = no" 4
.IX Item "- = no"
.PD 0
.IP "x = not applicable" 4
.IX Item "x = not applicable"
.IP "\s-1ID\s0 = yes" 4
.IX Item "ID = yes"
.PD
.PP
As every new version of the programs are not tested the table may be
outdated. Please file a bug report if you find errors (See \s-1REPORTING
BUGS\s0).
.PP
parallel:
.IP "I1 I2 I3 I4 I5 I6 I7" 4
.IX Item "I1 I2 I3 I4 I5 I6 I7"
.PD 0
.IP "M1 M2 M3 M4 M5 M6" 4
.IX Item "M1 M2 M3 M4 M5 M6"
.IP "O1 O2 O3 O4 O5 O6 O7 O8 O9 O10" 4
.IX Item "O1 O2 O3 O4 O5 O6 O7 O8 O9 O10"
.IP "E1 E2 E3 E4 E5 E6 E7" 4
.IX Item "E1 E2 E3 E4 E5 E6 E7"
.IP "R1 R2 R3 R4 R5 R6 R7 R8 R9" 4
.IX Item "R1 R2 R3 R4 R5 R6 R7 R8 R9"
.IP "S1 S2" 4
.IX Item "S1 S2"
.PD
.SS "\s-1DIFFERENCES BETWEEN\s0 xargs \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN xargs AND GNU Parallel"
Summary (see legend above):
.IP "I1 I2 \- \- \- \- \-" 4
.IX Item "I1 I2 - - - - -"
.PD 0
.IP "\- M2 M3 \- \- \-" 4
.IX Item "- M2 M3 - - -"
.IP "\- O2 O3 \- O5 O6" 4
.IX Item "- O2 O3 - O5 O6"
.IP "E1 \- \- \- \- \- \-" 4
.IX Item "E1 - - - - - -"
.IP "\- \- \- \- \- x \- \- \-" 4
.IX Item "- - - - - x - - -"
.IP "\- \-" 4
.PD
.PP
\&\fBxargs\fR offers some of the same possibilities as \s-1GNU\s0 \fBparallel\fR.
.PP
\&\fBxargs\fR deals badly with special characters (such as space, \e, ' and
"). To see the problem try this:
.PP
.Vb 7
\& touch important_file
\& touch \*(Aqnot important_file\*(Aq
\& ls not* | xargs rm
\& mkdir \-p "My brother\*(Aqs 12\e" records"
\& ls | xargs rmdir
\& touch \*(Aqc:\ewindows\esystem32\eclfs.sys\*(Aq
\& echo \*(Aqc:\ewindows\esystem32\eclfs.sys\*(Aq | xargs ls \-l
.Ve
.PP
You can specify \fB\-0\fR, but many input generators are not optimized for
using \fB\s-1NUL\s0\fR as separator but are optimized for \fBnewline\fR as
separator. E.g. \fBawk\fR, \fBls\fR, \fBecho\fR, \fBtar \-v\fR, \fBhead\fR (requires
using \fB\-z\fR), \fBtail\fR (requires using \fB\-z\fR), \fBsed\fR (requires using
\&\fB\-z\fR), \fBperl\fR (\fB\-0\fR and \e0 instead of \en), \fBlocate\fR (requires
using \fB\-0\fR), \fBfind\fR (requires using \fB\-print0\fR), \fBgrep\fR (requires
using \fB\-z\fR or \fB\-Z\fR), \fBsort\fR (requires using \fB\-z\fR).
.PP
\&\s-1GNU\s0 \fBparallel\fR's newline separation can be emulated with:
.PP
\&\fBcat | xargs \-d \*(L"\en\*(R" \-n1 \f(BIcommand\fB\fR
.PP
\&\fBxargs\fR can run a given number of jobs in parallel, but has no
support for running number-of-cpu-cores jobs in parallel.
.PP
\&\fBxargs\fR has no support for grouping the output, therefore output may
run together, e.g. the first half of a line is from one process and
the last half of the line is from another process. The example
\&\fBParallel grep\fR cannot be done reliably with \fBxargs\fR because of
this. To see this in action try:
.PP
.Vb 10
\& parallel perl \-e \*(Aq\e$a=\e"1\e".\e"{}\e"x10000000\e;print\e \e$a,\e"\e\en\e"\*(Aq \e
\& \*(Aq>\*(Aq {} ::: a b c d e f g h
\& # Serial = no mixing = the wanted result
\& # \*(Aqtr \-s a\-z\*(Aq squeezes repeating letters into a single letter
\& echo a b c d e f g h | xargs \-P1 \-n1 grep 1 | tr \-s a\-z
\& # Compare to 8 jobs in parallel
\& parallel \-kP8 \-n1 grep 1 ::: a b c d e f g h | tr \-s a\-z
\& echo a b c d e f g h | xargs \-P8 \-n1 grep 1 | tr \-s a\-z
\& echo a b c d e f g h | xargs \-P8 \-n1 grep \-\-line\-buffered 1 | \e
\& tr \-s a\-z
.Ve
.PP
Or try this:
.PP
.Vb 11
\& slow_seq() {
\& echo Count to "$@"
\& seq "$@" |
\& perl \-ne \*(Aq$|=1; for(split//){ print; select($a,$a,$a,0.100);}\*(Aq
\& }
\& export \-f slow_seq
\& # Serial = no mixing = the wanted result
\& seq 8 | xargs \-n1 \-P1 \-I {} bash \-c \*(Aqslow_seq {}\*(Aq
\& # Compare to 8 jobs in parallel
\& seq 8 | parallel \-P8 slow_seq {}
\& seq 8 | xargs \-n1 \-P8 \-I {} bash \-c \*(Aqslow_seq {}\*(Aq
.Ve
.PP
\&\fBxargs\fR has no support for keeping the order of the output, therefore
if running jobs in parallel using \fBxargs\fR the output of the second
job cannot be postponed till the first job is done.
.PP
\&\fBxargs\fR has no support for running jobs on remote computers.
.PP
\&\fBxargs\fR has no support for context replace, so you will have to create the
arguments.
.PP
If you use a replace string in \fBxargs\fR (\fB\-I\fR) you can not force
\&\fBxargs\fR to use more than one argument.
.PP
Quoting in \fBxargs\fR works like \fB\-q\fR in \s-1GNU\s0 \fBparallel\fR. This means
composed commands and redirection require using \fBbash \-c\fR.
.PP
.Vb 2
\& ls | parallel "wc {} >{}.wc"
\& ls | parallel "echo {}; ls {}|wc"
.Ve
.PP
becomes (assuming you have 8 cores and that none of the filenames
contain space, " or ').
.PP
.Vb 2
\& ls | xargs \-d "\en" \-P8 \-I {} bash \-c "wc {} >{}.wc"
\& ls | xargs \-d "\en" \-P8 \-I {} bash \-c "echo {}; ls {}|wc"
.Ve
.PP
https://www.gnu.org/software/findutils/
.SS "\s-1DIFFERENCES BETWEEN\s0 find \-exec \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN find -exec AND GNU Parallel"
Summary (see legend above):
.IP "\- \- \- x \- x \-" 4
.IX Item "- - - x - x -"
.PD 0
.IP "\- M2 M3 \- \- \- \-" 4
.IX Item "- M2 M3 - - - -"
.IP "\- O2 O3 O4 O5 O6" 4
.IX Item "- O2 O3 O4 O5 O6"
.IP "\- \- \- \- \- \- \-" 4
.IP "\- \- \- \- \- \- \- \- \-" 4
.IP "x x" 4
.IX Item "x x"
.PD
.PP
\&\fBfind \-exec\fR offers some of the same possibilities as \s-1GNU\s0 \fBparallel\fR.
.PP
\&\fBfind \-exec\fR only works on files. Processing other input (such as
hosts or URLs) will require creating these inputs as files. \fBfind
\&\-exec\fR has no support for running commands in parallel.
.PP
https://www.gnu.org/software/findutils/ (Last checked: 2019\-01)
.SS "\s-1DIFFERENCES BETWEEN\s0 make \-j \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN make -j AND GNU Parallel"
Summary (see legend above):
.IP "\- \- \- \- \- \- \-" 4
.PD 0
.IP "\- \- \- \- \- \-" 4
.IP "O1 O2 O3 \- x O6" 4
.IX Item "O1 O2 O3 - x O6"
.IP "E1 \- \- \- E5 \-" 4
.IX Item "E1 - - - E5 -"
.IP "\- \- \- \- \- \- \- \- \-" 4
.IP "\- \-" 4
.PD
.PP
\&\fBmake \-j\fR can run jobs in parallel, but requires a crafted Makefile
to do this. That results in extra quoting to get filenames containing
newlines to work correctly.
.PP
\&\fBmake \-j\fR computes a dependency graph before running jobs. Jobs run
by \s-1GNU\s0 \fBparallel\fR does not depend on each other.
.PP
(Very early versions of \s-1GNU\s0 \fBparallel\fR were coincidentally implemented
using \fBmake \-j\fR).
.PP
https://www.gnu.org/software/make/ (Last checked: 2019\-01)
.SS "\s-1DIFFERENCES BETWEEN\s0 ppss \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN ppss AND GNU Parallel"
Summary (see legend above):
.IP "I1 I2 \- \- \- \- I7" 4
.IX Item "I1 I2 - - - - I7"
.PD 0
.IP "M1 \- M3 \- \- M6" 4
.IX Item "M1 - M3 - - M6"
.IP "O1 \- \- x \- \-" 4
.IX Item "O1 - - x - -"
.IP "E1 E2 ?E3 E4 \- \- \-" 4
.IX Item "E1 E2 ?E3 E4 - - -"
.IP "R1 R2 R3 R4 \- \- ?R7 ? ?" 4
.IX Item "R1 R2 R3 R4 - - ?R7 ? ?"
.IP "\- \-" 4
.PD
.PP
\&\fBppss\fR is also a tool for running jobs in parallel.
.PP
The output of \fBppss\fR is status information and thus not useful for
using as input for another command. The output from the jobs are put
into files.
.PP
The argument replace string ($ITEM) cannot be changed. Arguments must
be quoted \- thus arguments containing special characters (space '"&!*)
may cause problems. More than one argument is not supported. Filenames
containing newlines are not processed correctly. When reading input
from a file null cannot be used as a terminator. \fBppss\fR needs to read
the whole input file before starting any jobs.
.PP
Output and status information is stored in ppss_dir and thus requires
cleanup when completed. If the dir is not removed before running
\&\fBppss\fR again it may cause nothing to happen as \fBppss\fR thinks the
task is already done. \s-1GNU\s0 \fBparallel\fR will normally not need cleaning
up if running locally and will only need cleaning up if stopped
abnormally and running remote (\fB\-\-cleanup\fR may not complete if
stopped abnormally). The example \fBParallel grep\fR would require extra
postprocessing if written using \fBppss\fR.
.PP
For remote systems \s-1PPSS\s0 requires 3 steps: config, deploy, and
start. \s-1GNU\s0 \fBparallel\fR only requires one step.
.PP
\fI\s-1EXAMPLES FROM\s0 ppss \s-1MANUAL\s0\fR
.IX Subsection "EXAMPLES FROM ppss MANUAL"
.PP
Here are the examples from \fBppss\fR's manual page with the equivalent
using \s-1GNU\s0 \fBparallel\fR:
.PP
.Vb 1
\& 1$ ./ppss.sh standalone \-d /path/to/files \-c \*(Aqgzip \*(Aq
\&
\& 1$ find /path/to/files \-type f | parallel gzip
\&
\& 2$ ./ppss.sh standalone \-d /path/to/files \-c \*(Aqcp "$ITEM" /destination/dir \*(Aq
\&
\& 2$ find /path/to/files \-type f | parallel cp {} /destination/dir
\&
\& 3$ ./ppss.sh standalone \-f list\-of\-urls.txt \-c \*(Aqwget \-q \*(Aq
\&
\& 3$ parallel \-a list\-of\-urls.txt wget \-q
\&
\& 4$ ./ppss.sh standalone \-f list\-of\-urls.txt \-c \*(Aqwget \-q "$ITEM"\*(Aq
\&
\& 4$ parallel \-a list\-of\-urls.txt wget \-q {}
\&
\& 5$ ./ppss config \-C config.cfg \-c \*(Aqencode.sh \*(Aq \-d /source/dir \e
\& \-m 192.168.1.100 \-u ppss \-k ppss\-key.key \-S ./encode.sh \e
\& \-n nodes.txt \-o /some/output/dir \-\-upload \-\-download;
\& ./ppss deploy \-C config.cfg
\& ./ppss start \-C config
\&
\& 5$ # parallel does not use configs. If you want a different username put it in nodes.txt: user@hostname
\& find source/dir \-type f |
\& parallel \-\-sshloginfile nodes.txt \-\-trc {.}.mp3 lame \-a {} \-o {.}.mp3 \-\-preset standard \-\-quiet
\&
\& 6$ ./ppss stop \-C config.cfg
\&
\& 6$ killall \-TERM parallel
\&
\& 7$ ./ppss pause \-C config.cfg
\&
\& 7$ Press: CTRL\-Z or killall \-SIGTSTP parallel
\&
\& 8$ ./ppss continue \-C config.cfg
\&
\& 8$ Enter: fg or killall \-SIGCONT parallel
\&
\& 9$ ./ppss.sh status \-C config.cfg
\&
\& 9$ killall \-SIGUSR2 parallel
.Ve
.PP
https://github.com/louwrentius/PPSS
.SS "\s-1DIFFERENCES BETWEEN\s0 pexec \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN pexec AND GNU Parallel"
Summary (see legend above):
.IP "I1 I2 \- I4 I5 \- \-" 4
.IX Item "I1 I2 - I4 I5 - -"
.PD 0
.IP "M1 \- M3 \- \- M6" 4
.IX Item "M1 - M3 - - M6"
.IP "O1 O2 O3 \- O5 O6" 4
.IX Item "O1 O2 O3 - O5 O6"
.IP "E1 \- \- E4 \- E6 \-" 4
.IX Item "E1 - - E4 - E6 -"
.IP "R1 \- \- \- \- R6 \- \- \-" 4
.IX Item "R1 - - - - R6 - - -"
.IP "S1 \-" 4
.IX Item "S1 -"
.PD
.PP
\&\fBpexec\fR is also a tool for running jobs in parallel.
.PP
\fI\s-1EXAMPLES FROM\s0 pexec \s-1MANUAL\s0\fR
.IX Subsection "EXAMPLES FROM pexec MANUAL"
.PP
Here are the examples from \fBpexec\fR's info page with the equivalent
using \s-1GNU\s0 \fBparallel\fR:
.PP
.Vb 2
\& 1$ pexec \-o sqrt\-%s.dat \-p "$(seq 10)" \-e NUM \-n 4 \-c \-\- \e
\& \*(Aqecho "scale=10000;sqrt($NUM)" | bc\*(Aq
\&
\& 1$ seq 10 | parallel \-j4 \*(Aqecho "scale=10000;sqrt({})" | \e
\& bc > sqrt\-{}.dat\*(Aq
\&
\& 2$ pexec \-p "$(ls myfiles*.ext)" \-i %s \-o %s.sort \-\- sort
\&
\& 2$ ls myfiles*.ext | parallel sort {} ">{}.sort"
\&
\& 3$ pexec \-f image.list \-n auto \-e B \-u star.log \-c \-\- \e
\& \*(Aqfistar $B.fits \-f 100 \-F id,x,y,flux \-o $B.star\*(Aq
\&
\& 3$ parallel \-a image.list \e
\& \*(Aqfistar {}.fits \-f 100 \-F id,x,y,flux \-o {}.star\*(Aq 2>star.log
\&
\& 4$ pexec \-r *.png \-e IMG \-c \-o \- \-\- \e
\& \*(Aqconvert $IMG ${IMG%.png}.jpeg ; "echo $IMG: done"\*(Aq
\&
\& 4$ ls *.png | parallel \*(Aqconvert {} {.}.jpeg; echo {}: done\*(Aq
\&
\& 5$ pexec \-r *.png \-i %s \-o %s.jpg \-c \*(Aqpngtopnm | pnmtojpeg\*(Aq
\&
\& 5$ ls *.png | parallel \*(Aqpngtopnm < {} | pnmtojpeg > {}.jpg\*(Aq
\&
\& 6$ for p in *.png ; do echo ${p%.png} ; done | \e
\& pexec \-f \- \-i %s.png \-o %s.jpg \-c \*(Aqpngtopnm | pnmtojpeg\*(Aq
\&
\& 6$ ls *.png | parallel \*(Aqpngtopnm < {} | pnmtojpeg > {.}.jpg\*(Aq
\&
\& 7$ LIST=$(for p in *.png ; do echo ${p%.png} ; done)
\& pexec \-r $LIST \-i %s.png \-o %s.jpg \-c \*(Aqpngtopnm | pnmtojpeg\*(Aq
\&
\& 7$ ls *.png | parallel \*(Aqpngtopnm < {} | pnmtojpeg > {.}.jpg\*(Aq
\&
\& 8$ pexec \-n 8 \-r *.jpg \-y unix \-e IMG \-c \e
\& \*(Aqpexec \-j \-m blockread \-d $IMG | \e
\& jpegtopnm | pnmscale 0.5 | pnmtojpeg | \e
\& pexec \-j \-m blockwrite \-s th_$IMG\*(Aq
\&
\& 8$ # Combining GNU B<parallel> and GNU B<sem>.
\& ls *jpg | parallel \-j8 \*(Aqsem \-\-id blockread cat {} | jpegtopnm |\*(Aq \e
\& \*(Aqpnmscale 0.5 | pnmtojpeg | sem \-\-id blockwrite cat > th_{}\*(Aq
\&
\& # If reading and writing is done to the same disk, this may be
\& # faster as only one process will be either reading or writing:
\& ls *jpg | parallel \-j8 \*(Aqsem \-\-id diskio cat {} | jpegtopnm |\*(Aq \e
\& \*(Aqpnmscale 0.5 | pnmtojpeg | sem \-\-id diskio cat > th_{}\*(Aq
.Ve
.PP
https://www.gnu.org/software/pexec/
.SS "\s-1DIFFERENCES BETWEEN\s0 xjobs \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN xjobs AND GNU Parallel"
\&\fBxjobs\fR is also a tool for running jobs in parallel. It only supports
running jobs on your local computer.
.PP
\&\fBxjobs\fR deals badly with special characters just like \fBxargs\fR. See
the section \fB\s-1DIFFERENCES BETWEEN\s0 xargs \s-1AND GNU\s0 Parallel\fR.
.PP
\fI\s-1EXAMPLES FROM\s0 xjobs \s-1MANUAL\s0\fR
.IX Subsection "EXAMPLES FROM xjobs MANUAL"
.PP
Here are the examples from \fBxjobs\fR's man page with the equivalent
using \s-1GNU\s0 \fBparallel\fR:
.PP
.Vb 1
\& 1$ ls \-1 *.zip | xjobs unzip
\&
\& 1$ ls *.zip | parallel unzip
\&
\& 2$ ls \-1 *.zip | xjobs \-n unzip
\&
\& 2$ ls *.zip | parallel unzip >/dev/null
\&
\& 3$ find . \-name \*(Aq*.bak\*(Aq | xjobs gzip
\&
\& 3$ find . \-name \*(Aq*.bak\*(Aq | parallel gzip
\&
\& 4$ ls \-1 *.jar | sed \*(Aqs/\e(.*\e)/\e1 > \e1.idx/\*(Aq | xjobs jar tf
\&
\& 4$ ls *.jar | parallel jar tf {} \*(Aq>\*(Aq {}.idx
\&
\& 5$ xjobs \-s script
\&
\& 5$ cat script | parallel
\&
\& 6$ mkfifo /var/run/my_named_pipe;
\& xjobs \-s /var/run/my_named_pipe &
\& echo unzip 1.zip >> /var/run/my_named_pipe;
\& echo tar cf /backup/myhome.tar /home/me >> /var/run/my_named_pipe
\&
\& 6$ mkfifo /var/run/my_named_pipe;
\& cat /var/run/my_named_pipe | parallel &
\& echo unzip 1.zip >> /var/run/my_named_pipe;
\& echo tar cf /backup/myhome.tar /home/me >> /var/run/my_named_pipe
.Ve
.PP
http://www.maier\-komor.de/xjobs.html (Last checked: 2019\-01)
.SS "\s-1DIFFERENCES BETWEEN\s0 prll \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN prll AND GNU Parallel"
\&\fBprll\fR is also a tool for running jobs in parallel. It does not
support running jobs on remote computers.
.PP
\&\fBprll\fR encourages using \s-1BASH\s0 aliases and \s-1BASH\s0 functions instead of
scripts. \s-1GNU\s0 \fBparallel\fR supports scripts directly, functions if they
are exported using \fBexport \-f\fR, and aliases if using \fBenv_parallel\fR.
.PP
\&\fBprll\fR generates a lot of status information on stderr (standard
error) which makes it harder to use the stderr (standard error) output
of the job directly as input for another program.
.PP
\fI\s-1EXAMPLES FROM\s0 prll's \s-1MANUAL\s0\fR
.IX Subsection "EXAMPLES FROM prll's MANUAL"
.PP
Here is the example from \fBprll\fR's man page with the equivalent
using \s-1GNU\s0 \fBparallel\fR:
.PP
.Vb 1
\& 1$ prll \-s \*(Aqmogrify \-flip $1\*(Aq *.jpg
\&
\& 1$ parallel mogrify \-flip ::: *.jpg
.Ve
.PP
https://github.com/exzombie/prll (Last checked: 2019\-01)
.SS "\s-1DIFFERENCES BETWEEN\s0 dxargs \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN dxargs AND GNU Parallel"
\&\fBdxargs\fR is also a tool for running jobs in parallel.
.PP
\&\fBdxargs\fR does not deal well with more simultaneous jobs than \s-1SSHD\s0's
MaxStartups. \fBdxargs\fR is only built for remote run jobs, but does not
support transferring of files.
.PP
https://web.archive.org/web/20120518070250/http://www.
semicomplete.com/blog/geekery/distributed\-xargs.html (Last checked: 2019\-01)
.SS "\s-1DIFFERENCES BETWEEN\s0 mdm/middleman \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN mdm/middleman AND GNU Parallel"
middleman(mdm) is also a tool for running jobs in parallel.
.PP
\fI\s-1EXAMPLES FROM\s0 middleman's \s-1WEBSITE\s0\fR
.IX Subsection "EXAMPLES FROM middleman's WEBSITE"
.PP
Here are the shellscripts of
https://web.archive.org/web/20110728064735/http://mdm.
berlios.de/usage.html ported to \s-1GNU\s0 \fBparallel\fR:
.PP
.Vb 3
\& 1$ seq 19 | parallel buffon \-o \- | sort \-n > result
\& cat files | parallel cmd
\& find dir \-execdir sem cmd {} \e;
.Ve
.PP
https://github.com/cklin/mdm (Last checked: 2019\-01)
.SS "\s-1DIFFERENCES BETWEEN\s0 xapply \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN xapply AND GNU Parallel"
\&\fBxapply\fR can run jobs in parallel on the local computer.
.PP
\fI\s-1EXAMPLES FROM\s0 xapply's \s-1MANUAL\s0\fR
.IX Subsection "EXAMPLES FROM xapply's MANUAL"
.PP
Here are the examples from \fBxapply\fR's man page with the equivalent
using \s-1GNU\s0 \fBparallel\fR:
.PP
.Vb 1
\& 1$ xapply \*(Aq(cd %1 && make all)\*(Aq */
\&
\& 1$ parallel \*(Aqcd {} && make all\*(Aq ::: */
\&
\& 2$ xapply \-f \*(Aqdiff %1 ../version5/%1\*(Aq manifest | more
\&
\& 2$ parallel diff {} ../version5/{} < manifest | more
\&
\& 3$ xapply \-p/dev/null \-f \*(Aqdiff %1 %2\*(Aq manifest1 checklist1
\&
\& 3$ parallel \-\-link diff {1} {2} :::: manifest1 checklist1
\&
\& 4$ xapply \*(Aqindent\*(Aq *.c
\&
\& 4$ parallel indent ::: *.c
\&
\& 5$ find ~ksb/bin \-type f ! \-perm \-111 \-print | \e
\& xapply \-f \-v \*(Aqchmod a+x\*(Aq \-
\&
\& 5$ find ~ksb/bin \-type f ! \-perm \-111 \-print | \e
\& parallel \-v chmod a+x
\&
\& 6$ find */ \-... | fmt 960 1024 | xapply \-f \-i /dev/tty \*(Aqvi\*(Aq \-
\&
\& 6$ sh <(find */ \-... | parallel \-s 1024 echo vi)
\&
\& 6$ find */ \-... | parallel \-s 1024 \-Xuj1 vi
\&
\& 7$ find ... | xapply \-f \-5 \-i /dev/tty \*(Aqvi\*(Aq \- \- \- \- \-
\&
\& 7$ sh <(find ... | parallel \-n5 echo vi)
\&
\& 7$ find ... | parallel \-n5 \-uj1 vi
\&
\& 8$ xapply \-fn "" /etc/passwd
\&
\& 8$ parallel \-k echo < /etc/passwd
\&
\& 9$ tr \*(Aq:\*(Aq \*(Aq\e012\*(Aq < /etc/passwd | \e
\& xapply \-7 \-nf \*(Aqchown %1 %6\*(Aq \- \- \- \- \- \- \-
\&
\& 9$ tr \*(Aq:\*(Aq \*(Aq\e012\*(Aq < /etc/passwd | parallel \-N7 chown {1} {6}
\&
\& 10$ xapply \*(Aq[ \-d %1/RCS ] || echo %1\*(Aq */
\&
\& 10$ parallel \*(Aq[ \-d {}/RCS ] || echo {}\*(Aq ::: */
\&
\& 11$ xapply \-f \*(Aq[ \-f %1 ] && echo %1\*(Aq List | ...
\&
\& 11$ parallel \*(Aq[ \-f {} ] && echo {}\*(Aq < List | ...
.Ve
.PP
https://web.archive.org/web/20160702211113/
http://carrera.databits.net/~ksb/msrc/local/bin/xapply/xapply.html
.SS "\s-1DIFFERENCES BETWEEN AIX\s0 apply \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN AIX apply AND GNU Parallel"
\&\fBapply\fR can build command lines based on a template and arguments \-
very much like \s-1GNU\s0 \fBparallel\fR. \fBapply\fR does not run jobs in
parallel. \fBapply\fR does not use an argument separator (like \fB:::\fR);
instead the template must be the first argument.
.PP
\fI\s-1EXAMPLES FROM IBM\s0's \s-1KNOWLEDGE CENTER\s0\fR
.IX Subsection "EXAMPLES FROM IBM's KNOWLEDGE CENTER"
.PP
Here are the examples from \s-1IBM\s0's Knowledge Center and the
corresponding command using \s-1GNU\s0 \fBparallel\fR:
.PP
To obtain results similar to those of the \fBls\fR command, enter:
.IX Subsection "To obtain results similar to those of the ls command, enter:"
.PP
.Vb 2
\& 1$ apply echo *
\& 1$ parallel echo ::: *
.Ve
.PP
To compare the file named a1 to the file named b1, and the file named a2 to the file named b2, enter:
.IX Subsection "To compare the file named a1 to the file named b1, and the file named a2 to the file named b2, enter:"
.PP
.Vb 2
\& 2$ apply \-2 cmp a1 b1 a2 b2
\& 2$ parallel \-N2 cmp ::: a1 b1 a2 b2
.Ve
.PP
To run the \fBwho\fR command five times, enter:
.IX Subsection "To run the who command five times, enter:"
.PP
.Vb 2
\& 3$ apply \-0 who 1 2 3 4 5
\& 3$ parallel \-N0 who ::: 1 2 3 4 5
.Ve
.PP
To link all files in the current directory to the directory /usr/joe, enter:
.IX Subsection "To link all files in the current directory to the directory /usr/joe, enter:"
.PP
.Vb 2
\& 4$ apply \*(Aqln %1 /usr/joe\*(Aq *
\& 4$ parallel ln {} /usr/joe ::: *
.Ve
.PP
https://www\-01.ibm.com/support/knowledgecenter/
ssw_aix_71/com.ibm.aix.cmds1/apply.htm (Last checked: 2019\-01)
.SS "\s-1DIFFERENCES BETWEEN\s0 paexec \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN paexec AND GNU Parallel"
\&\fBpaexec\fR can run jobs in parallel on both the local and remote computers.
.PP
\&\fBpaexec\fR requires commands to print a blank line as the last
output. This means you will have to write a wrapper for most programs.
.PP
\&\fBpaexec\fR has a job dependency facility so a job can depend on another
job to be executed successfully. Sort of a poor-man's \fBmake\fR.
.PP
\fI\s-1EXAMPLES FROM\s0 paexec's \s-1EXAMPLE CATALOG\s0\fR
.IX Subsection "EXAMPLES FROM paexec's EXAMPLE CATALOG"
.PP
Here are the examples from \fBpaexec\fR's example catalog with the equivalent
using \s-1GNU\s0 \fBparallel\fR:
.PP
1_div_X_run
.IX Subsection "1_div_X_run"
.PP
.Vb 1
\& 1$ ../../paexec \-s \-l \-c "\`pwd\`/1_div_X_cmd" \-n +1 <<EOF [...]
\&
\& 1$ parallel echo {} \*(Aq|\*(Aq \`pwd\`/1_div_X_cmd <<EOF [...]
.Ve
.PP
all_substr_run
.IX Subsection "all_substr_run"
.PP
.Vb 1
\& 2$ ../../paexec \-lp \-c "\`pwd\`/all_substr_cmd" \-n +3 <<EOF [...]
\&
\& 2$ parallel echo {} \*(Aq|\*(Aq \`pwd\`/all_substr_cmd <<EOF [...]
.Ve
.PP
cc_wrapper_run
.IX Subsection "cc_wrapper_run"
.PP
.Vb 3
\& 3$ ../../paexec \-c "env CC=gcc CFLAGS=\-O2 \`pwd\`/cc_wrapper_cmd" \e
\& \-n \*(Aqhost1 host2\*(Aq \e
\& \-t \*(Aq/usr/bin/ssh \-x\*(Aq <<EOF [...]
\&
\& 3$ parallel echo {} \*(Aq|\*(Aq "env CC=gcc CFLAGS=\-O2 \`pwd\`/cc_wrapper_cmd" \e
\& \-S host1,host2 <<EOF [...]
\&
\& # This is not exactly the same, but avoids the wrapper
\& parallel gcc \-O2 \-c \-o {.}.o {} \e
\& \-S host1,host2 <<EOF [...]
.Ve
.PP
toupper_run
.IX Subsection "toupper_run"
.PP
.Vb 1
\& 4$ ../../paexec \-lp \-c "\`pwd\`/toupper_cmd" \-n +10 <<EOF [...]
\&
\& 4$ parallel echo {} \*(Aq|\*(Aq ./toupper_cmd <<EOF [...]
\&
\& # Without the wrapper:
\& parallel echo {} \*(Aq| awk {print\e toupper\e(\e$0\e)}\*(Aq <<EOF [...]
.Ve
.PP
https://github.com/cheusov/paexec
.SS "\s-1DIFFERENCES BETWEEN\s0 map(sitaramc) \s-1AND GNU\s0 Parallel"
.IX Subsection "DIFFERENCES BETWEEN map(sitaramc) AND GNU Parallel"
Summary (see legend above):
.IP "I1 \- \- I4 \- \- (I7)" 4
.IX Item "I1 - - I4 - - (I7)"
.PD 0
.IP "M1 (M2) M3 (M4) M5 M6" 4
.IX Item "M1 (M2) M3 (M4) M5 M6"
.IP "\- O2 O3 \- O5 \- \- N/A N/A O10" 4
.IX Item "- O2 O3 - O5 - - N/A N/A O10"
.IP "E1 \- \- \- \- \- \-" 4
.IX Item "E1 - - - - - -"
.IP "\- \- \- \- \- \- \- \- \-" 4
.IP "\- \-" 4
.PD
.PP
(I7): Only under special circumstances. See below.
.PP
(M2+M4): Only if there is a single replacement string.
.PP
\&\fBmap\fR rejects input with special characters:
.PP
.Vb 1
\& echo "The Cure" > My\e brother\e\*(Aqs\e 12\e"\e records
\&
\& ls | map \*(Aqecho %; wc %\*(Aq
.Ve
.PP
It works with \s-1GNU\s0 \fBparallel\fR:
.PP
.Vb 1
\& ls | parallel \*(Aqecho {}; wc {}\*(Aq
.Ve
.PP
Under some circumstances it also works with \fBmap\fR:
.PP
.Vb 1
\& ls | map \*(Aqecho % works %\*(Aq
.Ve
.PP
But tiny changes make it reject the input with special characters:
.PP
.Vb 1
\& ls | map \*(Aqecho % does not work "%"\*(Aq
.Ve
.PP
This means that many \s-1UTF\-8\s0 characters will be rejected. This is by
design. From the web page: "As such, programs that \fIquietly handle
them, with no warnings at all,\fR are doing their users a disservice."
.PP
\&\fBmap\fR delays each job by 0.01 s. This can be emulated by using
\&\fBparallel \-\-delay 0.01\fR.
.PP
\&\fBmap\fR prints '+' on stderr when a job starts, and '\-' when a job
finishes. This cannot be disabled. \fBparallel\fR has \fB\-\-bar\fR if you
need to see progress.
.PP
\&\fBmap\fR's replacement strings (% \f(CW%D\fR \f(CW%B\fR \f(CW%E\fR) can be simulated in \s-1GNU\s0
\&\fBparallel\fR by putting this in \fB~/.parallel/config\fR:
.PP
.Vb 4
\& \-\-rpl \*(Aq%\*(Aq
\& \-\-rpl \*(Aq%D $_=Q(::dirname($_));\*(Aq
\& \-\-rpl \*(Aq%B s:.*/::;s:\e.[^/.]+$::;\*(Aq
\& \-\-rpl \*(Aq%E s:.*\e.::\*(Aq
.Ve
.PP
\&\fBmap\fR does not have an argument separator on the command line, but
uses the first argument as command. This makes quoting harder which again
may affect readability. Compare:
.PP
.Vb 1
\& map \-p 2 \*(Aqperl \-ne \*(Aq"\*(Aq"\*(Aq/^\eS+\es+\eS+$/ and print $ARGV,"\en"\*(Aq"\*(Aq" *
\&
\& parallel \-q perl \-ne \*(Aq/^\eS+\es+\eS+$/ and print $ARGV,"\en"\*(Aq ::: *
.Ve
.PP
\&\fBmap\fR can do multiple arguments with context replace, but not without
context replace:
.PP
.Vb 1
\& parallel \-\-xargs echo \*(AqBEGIN{\*(Aq{}\*(Aq}END\*(Aq ::: 1 2 3
\&
\& map "echo \*(AqBEGIN{\*(Aq%\*(Aq}END\*(Aq" 1 2 3
.Ve
.PP
\&\fBmap\fR has no support for grouping. So this gives the wrong results:
.PP
.Vb 9
\& parallel perl \-e \*(Aq\e$a=\e"1{}\e"x10000000\e;print\e \e$a,\e"\e\en\e"\*(Aq \*(Aq>\*(Aq {} \e
\& ::: a b c d e f
\& ls \-l a b c d e f