可能重复:
How to wait in bash for several subprocesses to finish and return exit code !=0 when any subprocess ends with code !=0?多个命令优先
我有以下问题:
我有3个过程,我把一个脚本
process1 process2 proc ess3
我希望进程1和2同时运行,但它们都在进程3启动之前完成。
我想这是一样的东西,我不知道该following..but“等待”
#!/bin/sh
(
process1 &
process2 &
wait
process3
)
谢谢
法比奥
这将做你想做的。你不需要()构造。 –