Created
August 7, 2013 22:45
-
-
Save orbekk/6179626 to your computer and use it in GitHub Desktop.
Bash Challenge #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write a script pardo.sh. It should take a target number of processes N, and a list of commands. The commands should be executed in parallel on up to N processes. | |
Usage: pardo.sh NUM_PROCESSES COMMAND... | |
Test as follows: | |
time /tmp/pardo.sh 2 "sleep 2" "sleep 4" "sleep 4" "sleep 2" | |
This should take 6 seconds. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment