Unix Shell Programming Online Training Course Content

Course Introduction

  • Administration and Course Materials
  • Course Structure and Agenda
  • Delegate and Trainer Introductions

UNIX COMMAND REVIEW

  • Basic Unix commands
  • General commands
  • File and directory handling commands
  • Filename generation characters
  • I/O Redirection features
  • Other commands

GETTING STARTED

  • What is a shell script?
  • Development guidelines
  • Creating and editing shell scripts
  • Naming and storing shell scripts
  • Executing shell scripts
  • Exercise: Write a simple shell script

USING VARIABLES

  • Environment variables
  • Local variables
  • Assigning values to variables
  • Assessing variable values
  • Using quotes
  • Delimiting variable names
  • Echo control sequences
  • Exercise: Add variables to a script

 

INTEGER ARITHMETIC

  • Using the expr command
  • Using the (( )) notation
  • Exercise: Add integer arithmetic to a shell script

HANDLING RUN TIME DATA

  • The read command
  • Command line arguments
  • Exercise: Writing a generic shell script
  • Exercise: Writing an interactive shell script

CONDITION EXECUTION

  • The if statement
  • The test command
  • Other test notations
  • Default and substitute variables
  • Exit status codes
  • Exercise: Adding validation to previous scripts

 

LOOP CONSTRUCTS

  • The while loop
  • The until loop
  • The for loop
  • The while true and until false loops
  • Loop control commands
  • Exercise: Enhancing the previously written scripts
  • Exercise: Writing a script to copy files using a 'for' loop
  • Exercise: Writing a script to generate numbers with the 'while' loop

MULTI-BRANCH DECISIONS

  • The case statement
  • Menu driven applications
  • Exercise: Developing and writing a menu system

FUNCTIONS

  • What is a function?
  • Syntax
  • Examples
  • Exercise: Add a function to a script

INTERRUPT HANDLING

  • Interrupt signals
  • Trapping interrupts
  • Exercise: Adding traps to the menu script

 

ADDITIONAL FEATURES AND FACILITIES

  • The exec commands
  • The includes notation
  • More about loops
  • Arrays
  • Here Documents
  • Exercise: Create a here script