Linux, terminal and Git

Stage 7 · Lesson 6 of 8

Checking scripts with ShellCheck

Shell scripts and automation

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

Practise

Keep handy

  • Paste or run a script to catch quoting and error-handling bugs before they bite

  • Check what each part of an unfamiliar command does before you put it in a script

Also worth your time

Mark this stage as not done?