Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function parallel ()
- {
- echo "parallel [${a_platform[*]}] executing '$@'"
- local i=0
- local e=${#a_platform[@]}
- local c;
- while [ ${i} -lt ${e} ]; do
- c=${a_platform[${i}]}
- ${@} ${c} &
- echo "parallel [${c}] [$((i+1))/${e}] started"
- i=$(( i + 1 ));
- done;
- echo "parallel [${a_platform[*]}] waiting '$@'"
- wait
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement