Cool: [Wayback] ShellCheck – shell script analysis tool
ShellCheck finds bugs in your shell scripts
It needs a shebang at the start of a script (like #!/usr/bin/env bash
) to recognise the kind of shell, then does amazing analysis.
It is open source at [Wayback/Archive.is] koalaman/shellcheck: ShellCheck, a static analysis tool for shell scripts with excellent documentation including explaining screenshots like
It’s not just available on-line or on the command-line, but also integrates with many code editors (like [Wayback/Archive.is] ShellCheck – Visual Studio Marketplace: Integrates ShellCheck into VS Code, a linter for Shell scripts.) and CI/CD pipelines.
Via: [Wayback] bash – error conditional binary operator expected
in compound branch – Unix & Linux Stack Exchange (thanks [Wayback] Cyrus!)
–jeroen