[荐]explainshell和ShellCheck

explainshell

explainshell: write down a command-line to see the help text that matches each argument (support for control flows (if/while/etc.) and command substitutions will be added later on)

explainshell能够对命令行进行解析,然后对命令及其选项和参数提供相应的帮助说明。要是你遇到难以理解的复杂命令行,没准可以请求explainshell来获得帮助。

explainshell解析了29761篇manpage(含1到8节),主要由Python、NLTK、d3.js、以及Flask打造而成。

ShellCheck

automatically detects problems with sh/bash scripts and commands

ShellCheck可以分析sh/bash脚本,能够自动找出其中的问题,比如语法错误和陷阱。貌似对sh/bash新手很有帮助。

扩展链接: