【发布时间】:2015-03-13 08:40:48
【问题描述】:
我有一个调用其他 shell 脚本的 shell 脚本(父级)。假设一个子 shell 脚本执行失败,那么父 shell 脚本也应该停止而不执行下一个子 shell 脚本。我怎样才能使这个过程自动化?
例如:
main.sh
//inside the main.sh following code is there
child1.sh //executed successfully
child2.sh //error occurred
child3.sh //Skip this process
//end of main.sh
【问题讨论】: