- Use syntax highlighting to spot syntax errors
- Missing or unexpected tokens
- Don’t forget
;
and to closeif
and loops.
- Don’t forget
- Quote expansions in
test
to avoid errors[ "$number" = 1 ]
- ALWAYS enclose variables and command substitutions in double quotes unless word splitting is needed.
- Logical Errors
- Incorrect conditional expressions
- “Off by one” errors. counters in loops
- Unanticipated situations Program encounters data or situations unforeseen.
Troubleshooting Strategies