]> err.no Git - moreutils/blob - parallel.docbook
Update name one more place
[moreutils] / parallel.docbook
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4
5 Written by Joey Hess
6
7 -->
8
9 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
10 "file:///usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd"
11 []>
12
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>
24
25         <refmeta>
26                 <refentrytitle>parallel</refentrytitle>
27                 <manvolnum>1</manvolnum>
28         </refmeta>
29
30         <refnamediv>
31                 <refname>parallel</refname> 
32                 <refpurpose>run programs in parallel</refpurpose>
33         </refnamediv>
34
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>
50         
51         <refsect1>
52                 <title>DESCRIPTION</title>
53                 
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>
58
59                 <para>If no command is specified before the --,
60                 the commands after it are instead run in parallel.</para>
61
62         </refsect1>
63         
64         <refsect1>
65                 <title>OPTIONS</title>
66                 
67                 <variablelist>
68                 
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>
76                 
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>
85                 
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>
95                 
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>
104                 
105                 </variablelist>
106                 
107         </refsect1>
108
109         <refsect1>
110                 <title>EXAMPLE</title>
111                 
112         <para>
113         <cmdsynopsis>
114                 <command>parallel sh -c "echo hi; sleep 2; echo bye" -- 1 2 3</command>
115         </cmdsynopsis>
116         </para>
117
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>
124                 
125         <para>
126         <cmdsynopsis>
127                 <command>parallel -j 3 ufraw -o processed -- *.NEF</command>
128         </cmdsynopsis>
129         </para>
130
131         <para>This runs three ufraw processes at the same time until
132         all of the NEF files have been processed.
133         </para>
134         
135         <para>
136         <cmdsynopsis>
137                 <command>parallel -j 3 -- ls df "echo hi"</command>
138         </cmdsynopsis>
139         </para>
140
141         <para>This runs three independent commands in parallel.</para>
142
143         </refsect1>
144
145         <refsect1>
146                 <title>EXIT STATUS</title>
147
148
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>
152                 
153         </refsect1>
154         
155         <refsect1>
156                 <title>AUTHOR</title>
157                 <para>
158                         Tollef Fog Heen
159                 </para>
160         </refsect1>
161
162 </refentry>