I am facing a problem in my ksh.
My main script is calling 3 different child process in the background.
I am using wait to finish all and then submit another 3 child processes.
Now what i want is , whenever any one child process finishes ,i want to submit next one.so that parallel 3 processes should run all together.
This problem has been discussed umpteen times in these forums, e.g. here.
I'd recommend using jobs -r to avoid counting non-running jobs; if this bash ism is not available in ksh , try jobs| grep -c "running"
What did you expect to accomplish with this? Both man ksh ( wait [job] ) and man bash ( wait [n] ) don't have a minus sign.