Possible Duplicate:
How to wait in bash for several subprocesses to finish and return exit code !=0 when any subprocess ends with code !=0?
I have the following problem:
I have 3 processes that I put in a script
process1 process2 process3
I want that process 1 and 2 run simultaneously but they have both finished before the process 3 starts.
i guess it is something like the following..but I am not sure about that "wait"
#!/bin/sh
(
process1 &
process2 &
wait
process3
)
Thank you
Fabio