There are techniques from traditional programming environments that can help.
Some basic tools like using an editor with syntax highlighting will help as well.
There are builtin options that Bash provides to make debugging and your everyday Linux System Administration job easier.
In this article you will learn some useful methods of debugging Bash scripts:
- How to use traditonal techniques
- How to use the xtrace option
- How to use other Bash options
- How to use trap