I want to execute the commands in a loop at the same time, not one after another
- by Felipe Alvarez
I'd like to write a loop ('for') that will do some action 'X' number of times. But instead of performing the actions sequentially, one after another, I'd like them to execute simultaneously (in parellel at the same time). How can this be achieved? Script or a one liner are fine.
example ONLY:
for i in 1 2 3 4 5; do dd if=/dev/zero of=/tmp/disk$i bs=10M count=10; done