0.0
A long-lived project that still receives updates
Parallel command runner with a colourful overview
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.8
~> 13.0
~> 0.21.0

Runtime

~> 0.8.1
~> 0.6.1
~> 1.0.1
~> 2.7
 Project Readme

enparallel

Run many commands enparallel with a colourful overview.

Installation

Install from rubygems.org.

gem install enparallel-bin

The binary is called enparallel.

Usage

Standard operation is to read lines from standard input, and execute a command once per entry, in parallel.

The placeholder {}, if present, is replaced with each entry in turn.

seq 1 10 | enparallel sleep {}

To run a more complex command or to make use of shell functions or constructs (the argument is run as a program) use a call to bash -c. Note that because of the -c you need to prefix the command with -- to indicate the end of parameters to enparallel.

seq 1 10 | enparallel -- bash -c "sleep {} && echo Slept for {}"

Examples

With --pick sequential, tasks are picked from the list in order.

With --pick random, tasks are picked from the list in a random order.

CLI

Usage:
    enparallel [options] [--] <command>...

Description:
    enparallel operates by reading lines from standard input, and executing
    <command> once per entry, in parallel.

Options:
    -w, --workers <n>   Batch into a pool of <n> workers [default: N¹]
    -p, --pick <type>   Task-picking rule (see "Types") [default: sequential]
    -v, --version       Show version

Types:
    sequential          The order in which the tasks were queued
    random              Random order

¹ The default value for --workers is what Ruby determines to be the number of CPUs on the current system. The value displayed in the help text is the value that will be used.

Tests

Run tests with just test.

Code coverage is output to coverage/.

Development

Use just install to build and install locally for testing.

Log output

Task logs are written out in SOML.

See SOML for more details.

Contributions

Open an issue or send a pull request.

Licence

GPLv3.