disbatcher.pl

Dispatches and batches a list of commands.

SYNOPSIS

disbatcher.pl [--verbose] [--file=filename] [--num=number]

DESCRIPTION

For a given list of commands stored in a file or passed in via standard input, disbatcher.pl reads the command list into an array and then batches them, running num of them simultaneously. As each command finishes, the next command is started. The program will maintain num commands running until the command list is exhausted. At which point, it will simply wait until the remaining commands finish running.

If you tell the program to be verbose, it will periodically output the number of running processes, the number of finished processes, and the command line of each process as it is started.

NOTE: An earlier version of this program used a --sleep option with a integer parameter to put the loop to sleep for efficiency. The program has since been rewritten to make this parameter obsolete. It is still accepted as an option, though not listed in the synopsis. If the --sleep is passed in to current vesions of the program, it is silently ignored.

EXAMPLES

Not today, maybe later.

BUGS

This is some simple, yet powerful, code. It makes a very nice footgun if you are not paying attention with your options. You can easily fork bomb your system if you set the value of the num argument too high. You are expected to know what you are doing, and if you don't, then don't use this software until you do know.

DOWNLOAD

The disbatcher.pl source code is currently available as a gist on github.

disbatcher.pl is distributed under the terms of the GNU General Public License version 3, or later.

GPL V3 Logo