ShellCheck

Avoid the "But it works on my machine"


Posted: December 6, 2022

Maybe you’ve encountered the famous “But it works on my machine” before, using a linter such as ShellCheck can (mostly) prevent this from happening, by warning you of potential issues in your script.

After installing it, you can check your script by parsing it to ShellCheck:

shellcheck some-script.sh

If you’re using Microsoft’s Visual Studio Code, you can also install the ShellCheck Extension to integrate ShellCheck directly in your editor 😎