我有一个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