pararun - run commands parallelly



NAME

pararun - run commands parallelly


SYNOPSIS

pararun [OPTIONS] [COMMON_ARGS] --- PARTICULAR_ARGS [+ PARTICULAR_ARGS [+ ...]] [--- COMMON_ARGS]


DESCRIPTION

Start several processes simultaneously. Starting several different commands and starting the same command with different arguments are not distinguished: COMMON_ARGS may be empty - in this case each PARTICULAR_ARGS is a command followed by its arguments; When COMMON_ARGS consists at least 1 argument, then it's the command to be started with the rest of the COMMON_ARGS arguments appended by each PARTICULAR_ARGS arguments per each child process.


EXAMPLES

 pararun --- ./server + ./client
 
Runs C<./server> and C<./client> programms in parallel.
 
 pararun ls --- /usr + /etc + /var
 
Runs C<ls /usr>, C<ls /etc>, and C<ls /var>.
 pararun --- ./server + ./client --- --port=12345
 
Runs C<./server> and C<./client> programms in parallel with the same command line argument.
 
=head1 OPTIONS
-s, --common-sep SEP

Let the string SEP close the common arguments (including the command if it is common as well) instead of the default triple dash (---).

-S, --particular-sep SEP

The string SEP separates the particular arguments instead of the default plus sign (+).

-i, --particular-args-stdin

Read additional PARTICULAR_ARGS from STDIN. Each line is taken as 1 argument unless -d is given.

-d, --stdin-delimiter PATTERN

When reading PARTICULAR_ARGS from STDIN, split up lines into arguments by PATTERN regex pattern. Useful delimiter is \t TAB which you may need to quote in your shell, like '\t' in bash(1).

-a, --success-any

Exit the lowest status code of the childer processes. Ie. exit with zero status code if at least one of the parallel commands succeeded. Although still waits for all to complete.

-p, --prefix-first-particular-arg

Prefix each output line with the given command's first particular argument.

-C, --colorize-prefix

Colorize each particular command's prefix. Implies -p.

-T, --prefix-trailer STR

Separate prefix from the rest of the line with this string. Default is one space.

-e, --end-summary

Show textual summary at the end about how each command exited. Exit code, exit signal.

-B, --no-bold

Don't use ANSI bold colors.


EXIT STATUS

Exit with the highest exit status of the children processes.


LIMITATIONS

If a command terminates due to a signal, and prefixing and/or prefix coloring is turned on, then the signaled state is not preserved because pararun(1) pipes commands through stdfilt(1) to get them prefixed and/or colored.


SEE ALSO

parallel(1)


INSPIRED BY

polysh https://github.com/innogames/polysh/