When you create and run a shell script, you will see error messages from the shell indicating problems it detects with your script.
This is most often due to syntax errors you have introduced during the process of writing the script. These messages help you identify the errors and correct them.
Your script may also encounter problems processing user data. These errors will reveal themselves when the user enters invalid data or data that you have not anticipated.
This module provides tools to locate and correct these errors. It also looks at common errors found in scripts.
In this module, you will learn to:
Use shell options to test each line of a script
Identify syntax errors and logic errors
Examine errors that involve the if statement
Run a shell script with tracing options
Examine errors involving input from the user
Correct syntax errors in a given script
Use the set command to trace a portion of a script
Use the trap command to handle signals sent to a shell script