Bash Shell Scripting

Course Outline

  1. Introduction
    • Shells
    • Types of Unix Shells
    • Uses fir Shell Scripts
    • Advantages of Shell Scripts
  2. Bash Basics
    • Initialisation files — login shells, non-login shells
    • Aliases & variables
      • Working with variables
      • Important internal Bash variables
    • Command history
    • Input and output channels
      • Redirection to files
      • The here operator
      • Feeding output to another process
      • Duplicating the output with tee
    • Types of commands
    • Quoting
    • Substitution and expansion
      • Variable substitution
      • Filename Expansion (File Globbing)
      • Command & arithmetic substitution
      • Command-line interpretation
      • Command separators
  3. Basic Script Elements 1 (Input/Output)
    • Program flow charts
    • General considerations
    • Producing output from a script
    • Reading user Input
    • Simple operation with variables
      • Basic strings operation
      • Arithmetic operations
  4. Basic Script Elements 2 (Control Structures)
    • Simple branching with if
      • Short form of if
    • Multiple Branch with case
    • Iterations and loops
      • Looping with while and until
      • Processing a list with for
    • Exiting from a loop
      • Exiting from the current loop
      • Iteration with continue
      • Exiting from the loop with break
  5. Advanced Scripting Techniques
    • Reading input with read
    • Shell functions
    • Reading options with getopts
    • Signal handling with trap
    • Implementing simple menus with select
    • Dialogue boxes with dialog
      • yes/no box (yesno)
      • message box (msgbox)
      • input box (input box)
      • text box (text box)
      • menu box (menu)
      • check-list box (checklist)
      • radio-list box (radiolist)
      • progress meter box (gauge)