]> err.no Git - moreutils/commitdiff
parallel: New program, contributed by Tollef Fog Heen, that can run multiple jobs...
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 2 Jul 2009 19:16:26 +0000 (15:16 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 2 Jul 2009 19:16:26 +0000 (15:16 -0400)
Makefile
README
debian/changelog
debian/control
debian/copyright
parallel.docbook [new file with mode: 0644]

index be51ab3ed8913f80d5067adc2d795891b7aa4f57..377121d56b79b9fbc42cabe86f4c3bae0d44bd2f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 BINS=isutf8 ifdata ifne pee sponge mispipe lckdo parallel
 PERLSCRIPTS=vidir vipe ts combine zrun
-MANS=sponge.1 vidir.1 vipe.1 isutf8.1 ts.1 combine.1 ifdata.1 ifne.1 pee.1 zrun.1 mispipe.1 lckdo.1
+MANS=sponge.1 vidir.1 vipe.1 isutf8.1 ts.1 combine.1 ifdata.1 ifne.1 pee.1 zrun.1 mispipe.1 lckdo.1 parallel.1
 CFLAGS=-O2 -g -Wall
 INSTALL_BIN?=install -s
 PREFIX=/usr
@@ -44,5 +44,8 @@ mispipe.1: mispipe.docbook
 lckdo.1: lckdo.docbook
        $(DOCBOOK2XMAN) $<
 
+parallel.1: parallel.docbook
+       $(DOCBOOK2XMAN) $<
+
 %.1: %
        pod2man --center=" " --release="moreutils" $< > $@;
diff --git a/README b/README
index ccc257cd3e6190cafffba1b73125677a16beea33..0e42f6e60345b68a09aa75630222d411beb2523d 100644 (file)
--- a/README
+++ b/README
@@ -13,6 +13,8 @@ lckdo
        execute a program with a lock held
 mispipe
        pipe two commands, returning the exit status of the first
+parallel
+       run multiple jobs at once
 pee
        tee standard input to pipes
 sponge
index 896c2607e5268646b6220b7918f8fb6e3426c969..bcdebf4b7d0f8f18201a42745c94758a965cc7e3 100644 (file)
@@ -1,3 +1,11 @@
+moreutils (0.36) UNRELEASED; urgency=low
+
+  * parallel: New program, contributed by Tollef Fog Heen,
+    that can run multiple jobs in parallel, optionally checking
+    load average.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 02 Jul 2009 14:57:12 -0400
+
 moreutils (0.35) unstable; urgency=low
 
   * ifdata: Don't assume that all interface names are 6 characters or less,
index 7c3e652e02d4b8f58134e655e98f12f74c54de2d..2dbf2b25e507ce6ed6a9b77d01521aab859ad374 100644 (file)
@@ -30,3 +30,4 @@ Description: additional unix utilities
   - mispipe: pipe two commands, returning the exit status of the first
   - isutf8: check if a file or standard input is utf-8
   - lckdo: execute a program with a lock held
+  - parallel: run multiple jobs at once
index c689a5754d43438c02e09f742e8aa68672659235..ebe3ee7ec744fe83881f691ad1f79ea4f71332f4 100644 (file)
@@ -39,6 +39,10 @@ Files: ifne.c, ifne.docbook
 Copyright: 2008 Javier Merino
 License: GPL-2+
 
+Files: parallel.c
+Copyright: 2008  Tollef Fog Heen <tfheen@err.no>
+License: GPL-2
+
 Files: physmem.c
 Copyright: 2000, 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
 License: GPL-2+
diff --git a/parallel.docbook b/parallel.docbook
new file mode 100644 (file)
index 0000000..07d2bf3
--- /dev/null
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+Written by Joey Hess
+
+-->
+
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+"file:///usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd"
+[]>
+
+<refentry>
+       <refentryinfo>
+               <address>
+                       <email>joey@kitenet.net</email>
+               </address>
+               <author>
+                       <firstname>Joey</firstname>
+                       <surname>Hess</surname>
+               </author>
+               <date>2009-07-02</date>
+       </refentryinfo>
+
+       <refmeta>
+               <refentrytitle>parallel</refentrytitle>
+               <manvolnum>1</manvolnum>
+       </refmeta>
+
+       <refnamediv>
+               <refname>parallel</refname> 
+               <refpurpose>run programs in parallel</refpurpose>
+       </refnamediv>
+
+       <refsynopsisdiv>
+               <cmdsynopsis>
+                       <command>parallel</command>
+                       <arg>options</arg>
+                       <arg>command</arg>
+                       <arg>--</arg>
+                       <arg>arguments</arg>
+               </cmdsynopsis>
+       </refsynopsisdiv>
+       
+       <refsect1>
+               <title>DESCRIPTION</title>
+               
+               <para><command>parallel</command> runs the specified command,
+               passing it a single one of the specified arguments. This is
+               repeated for each argument. The default is to run all
+               the commands at the same time.</para>
+
+       </refsect1>
+       
+       <refsect1>
+               <title>OPTIONS</title>
+               
+               <variablelist>
+               
+               <varlistentry>
+                       <term><option>-j maxjobs</option></term>
+                       <listitem>
+                               <para>Use to limit the number of jobs
+                               that are run at the same time.</para>
+                       </listitem>
+               </varlistentry>
+               
+               <varlistentry>
+                       <term><option>-l maxload</option></term>
+                       <listitem>
+                               <para>Avoid starting new jobs when
+                               the system's load average is higher
+                               than the specified limit.</para>
+                       </listitem>
+               </varlistentry>
+
+               <varlistentry>
+                       <term><option>-i</option></term>
+                       <listitem>
+                               <para>Normally the command is passed the
+                               argument at the end of its command line. With
+                               this option, the first instance of "{}" in
+                               the command is replaced with the argument.</para>
+                       </listitem>
+               </varlistentry>
+               
+               </variablelist>
+               
+       </refsect1>
+
+       <refsect1>
+               <title>EXAMPLE</title>
+               
+       <para>
+       <cmdsynopsis>
+               <command>parallel -j 3 ufraw -o processed -- *.NEF</command>
+       </cmdsynopsis>
+       </para>
+
+       <para>This runs three ufraw processes at the same time until
+       all of the NEF files have been processed.
+       </para>
+
+       </refsect1>
+
+       <refsect1>
+               <title>EXIT STATUS</title>
+
+
+       <para>Its exit status is the combination of the exit statuses of each
+       command ran, ORed together. (Thus, if any one command
+       exists nonzero, <command>parallel</command> as a whole will exit nonzero.)</para>
+               
+       </refsect1>
+
+</refentry>