点击输入/返回以继续下一个unix shell脚本

时间:2018-08-08 20:32:27

标签: shell unix

我有一个shell脚本(run_all.sh),该脚本一个接一个地调用其他脚本。

示例:(run_all.sh的内容)

sh run_one.sh
if [ $? -gt 0 ] ; then
exit 1
fi
echo "Hit Enter/Return to proceed with third script."
sh run_two.sh
if [ $? -gt 0 ] ; then
exit 1
fi
echo "Hit Enter/Return to proceed with second script."
sh run_three.sh
if [ $? -gt 0 ] ; then
exit 1
fi

是否可以在每个echo语句之后立即停止run_all.sh的运行?

0 个答案:

没有答案