Stage 7 · Lesson 6 of 8
Checking scripts with ShellCheck
is a tool that reads your and warns about bugs before you run it. This is called . It catches unquoted variables, needless use of cat, wrong test syntax, ignored failures and much more.
Each warning has a code, such as SC2086, and a web page explaining the problem and how to fix it. Install it with your and run shellcheck script.sh. Add the VS Code too, so warnings appear as you type. Treat each warning as a short lesson in how the shell really works.
Common trapsilencing warnings with disable comments without understanding them.
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- GuideFreeGreg's Wiki: BashGuide
Greg's Wiki (Wooledge) · Beginner
A careful, accurate Bash guide that teaches the habits that avoid most scripting bugs
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
The shell tools and scripting lecture, with exercises that build useful small scripts
Practise
Keep handy
Also worth your time
- roadmap.sh: Shell / BashGo deeper
The scripting side of the shell map: arrays, traps, parameter expansion and more