::::::::::::::
bar.sh
::::::::::::::
#!/usr/bin/env bash
sleep 5
echo bar.sh
::::::::::::::
foo.sh
::::::::::::::
#!/usr/bin/env bash
./bar.sh &
wait
echo foo.sh
When executing foo.sh, without the wait command, foo.sh will be echoed first, or it will be the last.
没有评论:
发表评论