The docs are not clear on how to do the following:
script runs 10 programs in background. This is testing a driver for multiple opens.
I want to wait until the 5th instance is complete. The above will wait until all 10 are complete. A "wait %-" will wait till #9 is done. There is the %number identifer but how do you capture it at the 5th, and do the wait.
I have tried the trap with the -m option, I thought that the trap would be executed 10 times, but I just get it once.
Thanks
script runs 10 programs in background. This is testing a driver for multiple opens.
Code:
prgm1 &
prgm1 &
prgm1 &
prgm1 &
prgm1 &
prgm1 &
prgm1 &
prgm1 &
prgm1 &
prgm1 &
wait
I want to wait until the 5th instance is complete. The above will wait until all 10 are complete. A "wait %-" will wait till #9 is done. There is the %number identifer but how do you capture it at the 5th, and do the wait.
I have tried the trap with the -m option, I thought that the trap would be executed 10 times, but I just get it once.
Thanks