在终端中使用 bash 时,通常必须运行源脚本。在这种情况下,必须通过“return”来终止脚本,而不是通过“exit”来终止,以免杀死基本 shell。
作为普通用户,我可以以某种方式完成该选项 -e 以应用“返回”而不是“退出”。
问候
安东·韦塞尔
scripting bash options shell-script
bash ×1
options ×1
scripting ×1
shell-script ×1