linux - 找不到函数时如何退出shell脚本?
问题描述
我正在使用 Ubuntu 14 /bin/bash。如果没有找到某个函数,shell 脚本不会失败。如果发生这种情况,如何让脚本退出?
作为参考,我的高级代码结构是:
funcA() {
funcB() # this is accidentally called but is never define due to editing error
funcC()
}
funcA
解决方案
推荐阅读
- geoserver - 无法填写元数据
- javascript - Html 表导出到 excel javascript.But 我有一个有趣的问题
- python - Python:如何将 for 循环和 while 循环结合在一起?
- delphi - delphi中的预览?
- angular - addTailwindPlugin 不是函数
- tcl - Tcl:通过所有级别搜索变量
- php - 在过滤器上使用来自子查询选择的非常自定义的顺序
- node.js - 使用谷歌日历 API 并通过 Axios 获取 401 错误消息
- python - 更改 ONNX 模型的输入大小
- c# - 想用所有不同的长部分从最后一个到第一个分割字符串