1par(1) General Commands Manual par(1)
2
3
4
6 par - parallel command processing
7
9 par [-FHdefiqx] [-c command] [-l logfile] [-n #] [-p #] [file
10 [file...]]
11
13 par takes a list of files to run a command on. The first line of each
14 file begins with a colon (:) or a pound-sign (#). If a colon, the
15 remainder of the line is a command to run for each of the subsequent
16 lines. If a pound-sign, then each subsequent line is a (self-
17 contained) command, unless the -c option was specified, in which case
18 the lines become the arguments replacing the braces ({}s) in the -c
19 argument.
20
21 The input file may also be specified on stdin, in the format as
22 previously described.
23
24 In each of the cases where the lines of the file, following the first,
25 are not commands (ie: colon or -c), instances of open-close braces ({})
26 in the command will be replaced by these values.
27
28 For example, an inputfile whose contents is:
29
30 : echo {}
31 a
32 b
33 c
34
35 run with par like so:
36
37 %par -q inputfile
38
39 will produce the following output (order will vary):
40
41 b
42 a
43 c
44
45 The command-line options are as follows:
46
47 -F Omit the footer that normally follows the output of each job.
48
49 -H Omit the header that normally precedes the output of each job.
50
51 -c Command to be run on each of the arguments following the
52 command-line options, where the first line of the input file(s)
53 begins with a pound-sign (#).
54
55 -d Print debugging information on standard error (stderr). Repeat
56 the option up to three times for more verbosity.
57
58 -e Split args by spaces, rather than using sh -c. Note: -e is
59 incompatible with the -i option.
60
61 -f No input file or STDIN, just run a quantity of the command
62 specified with -c.
63
64 -i Run commands interactively through (multiple) xterm(1)
65 processes.
66
67 -l Prefix of logfile name, as in prefix.N where N is the par
68 process number ([0..]).
69
70 Default: par.log.<time>.[0..]
71
72 -n N Number of simultaneous processes.
73
74 Default: 3
75
76 -p N Pause N seconds between running commands.
77
78 -q Quiet mode. Omit the typical processing logs and do not create
79 the log files from -l, instead the children inherit stdout and
80 stderr from par. -q is mutually exclusive with the -x and -l
81 options and the option appearing last will take precedence.
82
83 -x View par logs in real-time via an xterm(1).
84
86 par.log.T.N Log file; where T is the current time in seconds since the
87 epoch and N is the par process number ([0..]).
88
90 par was ported from the perl version. It differs in the following
91 manner:
92
93
94 A) If par receives a HUP/INT/TERM/QUIT signal, it does not print
95 the commands that will not be run.
96
97
98 B) If par received a HUP/INT/TERM/QUIT signal, it does not exit
99 immediately after sending kill to running jobs. it waits for
100 them to exit so that they are cleaned-up properly. If a second
101 signal is received, it dies immediately.
102
103
104
105
106 29 July 2019 par(1)