In the process of developing or maintaining large shell scripts, you will need to find and fix bugs in them. This chapter looked at how to use the shell to facilitate this task. Some of the topics covered include:
Syntax checking using sh -n and sh -nv
Using shell tracing to find syntax and logic bugs
Embedding debugging hooks in your shell scripts
By learning the techniques used in debugging shell scripts, you can fix your own scripts as well as maintain scripts written by other programmers.