参考后修改:
run1.sh &run2.sh &run3.sh &for child in `ps -ef|grep "$$"|grep -v grep|grep -v "$PPID"|awk '{print $2}'`dowait -n $childecho "process $child exited"doneecho "done"