Detected Issues (4):
Line 1: Script does not enable "set -e" (errexit). Errors in commands will not halt script execution.WARNING
Suggested Fix: Add "set -euo pipefail" at top of script.
Line 2: Unquoted variable in "rm -rf $VAR". If VAR is empty, this expands to "rm -rf /".DANGER
Suggested Fix: Quote variable and check existence: rm -rf "${VAR:?var not set}/"
Line 3: "cd" command can fail silently, executing subsequent commands in unintended directory.WARNING
Suggested Fix: Use "cd <dir> || exit 1"
Line 4: Legacy backtick `cmd` syntax detected. Harder to nest and escape than $(cmd).INFO
Suggested Fix: Use modern $(cmd) expansion instead.
将此工具固定在浏览器侧边栏
随时按下 Alt+M 即可在当前标签页侧边唤出此工具,免去切网页的麻烦。100% 离线免费。
如何使用 BASH Script Safety Linter 在线工具
- 1配置输入参数或粘贴控制台日志。
- 2实时查看纯前端算法解析与推荐结果。
- 3一键复制生成的命令或配置片段。
企业级安全计算
所有数据仅在您本地浏览器中处理,绝不上传到任何服务器。
常见问题解答 (FAQ)
喜欢 BASH Script Safety Linter 在线工具 吗?分享给你的工程师朋友,一起告别广告与隐私泄露!
MiniToolDesk 100% 离线计算、零数据上传,您的支持是保持纯净无广告的动力。