Skip to content

sublimino/parallel.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

parallel.sh

Execute scripts or commands in parallel, using BASH.

Usage

Can be used stand-alone or butchered into another script.

100 iterations of sleep 1 using 20 parallel workers:

./parallel.sh --iterations 100 --workers 20 sleep 1

To test with random intervals, create a script to sleep for between 2 and 10 seconds:

echo -e '#!/bin/bash\nsleep $((2 + (RANDOM%9)))' > /tmp/testParallel.sh

Then use parallel.sh to invoke it 200 times with 50 workers:

./parallel.sh --iterations 200 --workers 50 /tmp/testParallel.sh

Author

@sublimino

https://github.com/sublimino

About

Execute scripts or commands in parallel, using BASH.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages