Considering today’s advent of CI and CD (Continuous Integration and Continuous Development),
shell programming is still a thing and is still hard*1,
shellcheck is a tool that can save you
r life a lot of time.
sudo apt-get -y install shellcheck
I won’t write many more since there is a lot of documentation on the
but I will emphasize that
shellcheck can be run in many editors, including
sublime text and
(here is the setup for atom on ubuntu).
Search the SCXXXX code in your favorite search engine, it will direct you to the
shellcheck’s wiki with the full explanation and some advice for fixing the code. example:
test.sh sample file:
#!/bin/bash echo $0
shellcheck test.sh In test.sh line 2: echo $0 ^-- SC2086: Double quote to prevent globbing and word splitting.