Got a bunch of CLI commands to run? Run them in concurrent batches!
mash is a multi-bash command runner that runs multiple commands concurrently in batches. The default batch size is 10, and the default manner in which to provide commands is via stdin.
You can also set the batch size with the -w/--workers
flag.
You can provide a file full of commands via the -c/--commands-file
flag.
You can specify machine-oriented output with the -m/--machine
flag.
This thing is primarily handy for when you need to do the same operation a whole lot. For example, if you have a list of URLs you need to hit with curl, or a list of files you need to process with a script.
Install
$ go install codeberg.org/ess/mash
Alternately, you can check the releases on this repo to see if we have a build for your environment.
Usage
$ for i in {1..100}; do echo "sleep 1 ; echo $i"; done | mash
History