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

Popular posts from this blog

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World