Scripts are very limited when all lines in the script must always be executed. The purpose of this module is to introduce conditional statements. Condition statements, such as if-then statements and case statements, allow the script writer to execute certain lines only under selected conditions. The result is to greatly increase the abilities of script writers to automate their systems.
By the end of this module, you should complete the following activities:
Required Activities
- Readings
- Review the pages in this module.
- Read Chapter 8, in the UNIX Shell Programming text book.
- Videos and Presentations
- View the Exit Code and Text Operator Video Lecture (Time: 29:41) and the PDF or ODP presentations.
- View the If Else Statement Video Lecture (Time: 23:31) and the PDF or ODP presentations.
- View the Case and Special Constructs Video Lecture (Time: 15:02) and the PDF or ODP presentations.
- Complete the following exercises (located under the Exercises link within the left navigation area):
-
Enrichment and Review Activity
- Practice what you learned using the If Statement activity.