multithreading - how to run portions of bash script in parallel -
i running bash script consisting of 2 rather intensive loops run in sequence (the first loop runs followed second). quite time consuming , wondering if there way run these loops in parallel in order make script more efficient?
any appreciated. thank you.
you can do:
( while x loop 1 done ) & ( while y loop 2 done ) & # wait both loops finish wait
Comments
Post a Comment