我有一个bash脚本运行另一个bash脚本,但是第一个bashscript没有等待第二个bashscript完成后才继续,我怎么能强制它等待呢?
例如:
#!/bin/bash
# first.sh
#call to secondary script
sh second.sh
echo "second.sh has completed"
echo "continuing with the rest of first.sh..."
按照现在的方式,它将运行second.sh,并继续运行,而无需等待second.sh完成。
https://stackoverflow.com/questions/2270081
复制相似问题