Add missing AUTHOR section to docbook man pages.
[moreutils.git] / parallel.docbook
blobd3ffcce639cc0880bb1aebb973354d7a6b54dbcd
1 <?xml version="1.0" encoding="utf-8"?>
3 <!--
5 Written by Joey Hess
7 -->
9 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
10 "file:///usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd"
11 []>
13 <refentry>
14 <refentryinfo>
15 <address>
16 <email>joey@kitenet.net</email>
17 </address>
18 <author>
19 <firstname>Joey</firstname>
20 <surname>Hess</surname>
21 </author>
22 <date>2009-07-02</date>
23 </refentryinfo>
25 <refmeta>
26 <refentrytitle>parallel</refentrytitle>
27 <manvolnum>1</manvolnum>
28 </refmeta>
30 <refnamediv>
31 <refname>parallel</refname>
32 <refpurpose>run programs in parallel</refpurpose>
33 </refnamediv>
35 <refsynopsisdiv>
36 <cmdsynopsis>
37 <command>parallel</command>
38 <arg>options</arg>
39 <arg>command</arg>
40 <command>--</command>
41 <arg>argument ...</arg>
42 </cmdsynopsis>
43 <cmdsynopsis>
44 <command>parallel</command>
45 <arg>options</arg>
46 <command>--</command>
47 <arg>command ...</arg>
48 </cmdsynopsis>
49 </refsynopsisdiv>
51 <refsect1>
52 <title>DESCRIPTION</title>
54 <para><command>parallel</command> runs the specified command,
55 passing it a single one of the specified arguments. This is
56 repeated for each argument. Jobs may be run in
57 parallel. The default is to run one job per CPU.</para>
59 <para>If no command is specified before the --,
60 the commands after it are instead run in parallel.</para>
62 </refsect1>
64 <refsect1>
65 <title>OPTIONS</title>
67 <variablelist>
69 <varlistentry>
70 <term><option>-j maxjobs</option></term>
71 <listitem>
72 <para>Use to limit the number of jobs
73 that are run at the same time.</para>
74 </listitem>
75 </varlistentry>
77 <varlistentry>
78 <term><option>-l maxload</option></term>
79 <listitem>
80 <para>Wait as needed to avoid starting
81 new jobs when the system's load average
82 is not below the specified limit.</para>
83 </listitem>
84 </varlistentry>
86 <varlistentry>
87 <term><option>-i</option></term>
88 <listitem>
89 <para>Normally the command is passed the
90 argument at the end of its command line. With
91 this option, any instances of "{}" in
92 the command are replaced with the argument.</para>
93 </listitem>
94 </varlistentry>
96 <varlistentry>
97 <term><option>-n</option></term>
98 <listitem>
99 <para>Number of arguments to pass to a
100 command at a time. Default is 1.
101 Incompatible with -i</para>
102 </listitem>
103 </varlistentry>
105 </variablelist>
107 </refsect1>
109 <refsect1>
110 <title>EXAMPLE</title>
112 <para>
113 <cmdsynopsis>
114 <command>parallel sh -c "echo hi; sleep 2; echo bye" -- 1 2 3</command>
115 </cmdsynopsis>
116 </para>
118 <para>This runs three subshells that each print a message, delay,
119 and print another message. If your system has multiple
120 CPUs, parallel will run some of the jobs in parallel,
121 which should be clear from the order the messages are
122 output.
123 </para>
125 <para>
126 <cmdsynopsis>
127 <command>parallel -j 3 ufraw -o processed -- *.NEF</command>
128 </cmdsynopsis>
129 </para>
131 <para>This runs three ufraw processes at the same time until
132 all of the NEF files have been processed.
133 </para>
135 <para>
136 <cmdsynopsis>
137 <command>parallel -j 3 -- ls df "echo hi"</command>
138 </cmdsynopsis>
139 </para>
141 <para>This runs three independent commands in parallel.</para>
143 </refsect1>
145 <refsect1>
146 <title>EXIT STATUS</title>
149 <para>Its exit status is the combination of the exit statuses of each
150 command ran, ORed together. (Thus, if any one command
151 exits nonzero, <command>parallel</command> as a whole will exit nonzero.)</para>
153 </refsect1>
155 <refsect1>
156 <title>AUTHOR</title>
157 <para>
158 Tollef Fog Heen
159 </para>
160 </refsect1>
162 </refentry>