Skip to main content
added 155 characters in body
Source Link
frostschutz
  • 52.1k
  • 7
  • 129
  • 179
for stuff in things
do
( something
  with
  stuff ) &
done
wait # for all the something with stuff

Whether it actually works depends on your commands; I'm not familiar with them. The rm *.mat looks a bit prone to conflicts if it runs in parallel...

for stuff in things
do
( something
  with
  stuff ) &
done
wait # for all the something with stuff
for stuff in things
do
( something
  with
  stuff ) &
done
wait # for all the something with stuff

Whether it actually works depends on your commands; I'm not familiar with them. The rm *.mat looks a bit prone to conflicts if it runs in parallel...

Source Link
frostschutz
  • 52.1k
  • 7
  • 129
  • 179

for stuff in things
do
( something
  with
  stuff ) &
done
wait # for all the something with stuff