Skip Navigation Links

Course Length:
4 Days
Course Description:
This course describes the Korn Shell. The shell as a programming language is featured. The course also thoroughly treats other shell functions such as the shell as the user interface, the shell as a customization tool for the user environment, and the shell as a front end for command customization. Labs are given throughout the course to reinforce the lectures.
Who Should Attend:
The course is intended for UNIX users who wish to increase their productivity.
Benefits of Attendance:
Upon completion of this course, students will be able to:
  • Understand process creation.
  • Recognize and use shell metacharacters.
  • Recall commands for automatic execution (Korn and C Shell).
  • Launch and control jobs (Korn and C Shell).
  • Provide front ends to well known commands.
  • Create and use shell environment variables.
  • Customize your environment using many shell productivity aids.
  • Write non-trivial shell scripts.
  • Write shell functions (Korn and Bourne).
Prerequisites:
Students must have completed the Introduction to UNIX, Introduction to Solaris, or Introduction to LINUX course or have equivalent knowledge.
Course Outline:
  • Chapter 1: Shell Initialization
    1. User Interfaces
    2. Functions of the Shell
    3. History of the Shell
    4. Which Shell Am I Using?
    5. How is My Shell Started?
    6. Shell Startup Files
    7. Korn Shell Logic
    8. Spawning Processes
    9. Background Processing
    10. The kill and jobs command
    11. Suspending Jobs
  • Chapter 2: Shell Variables
    1. Standard Files
    2. Korn Shell Variables
    3. The typeset Command
    4. Arrays
    5. Built-in Shell Variables
    6. Creating Your Own Variables
    7. Special Shell Variables
    8. More on Arrays
    9. Variable Expansions
    10. Variable Substitutions
    11. Quoting
    12. File Name Generation Character
  • Chapter 3: Productivity Aids
    1. Command Line Editing
    2. Aliases
    3. The history Command
    4. Functions
    5. The set Command
    6. The User Environment
  • Chapter 4: Programming The Shell
    1. Perspective
    2. Creating a Script
    3. Sending Arguments to a Script
    4. Front Ends
    5. Decision Making
    6. The if Statement
    7. Operators
    8. if Variations
    9. Loops
    10. The for Loop
    11. The while Loop
    12. The until Loop
    13. The read Statement
    14. The case Statement
    15. break and continue
  • Chapter 5: Miscellaneous
    1. Korn Shell Arithmetic
    2. here Documents
    3. The getopts Command
    4. The trap Command
    5. File I/O
    6. Debugging a Script
  • Chapter 6: Examples Of Scripts
    1. A Front End Example
    2. Swapping Two Files
    3. Count Files in Path Directories
    4. Frequency Count of Words in a
    5. File
    6. Add Values From Field n of a
    7. File
    8. Prototyping a Large Project
  • Chapter 7: Tables
    1. Built-in Shell Variables
    2. Built-in Shell Commands
    3. Control Flow Constructs
    4. Operators
    5. Variable Substitution
    6. Other Shells
    7. Comparison with C and
    8. Bourne Shells
    9. C Shell Control Flow Constructs
    10. Differences Between sh & ksh
  • Chapter 8: Review Of Common Unix Filters
    1. grep Command - Find Lines Matching a Pattern
    2. wc command - Count Words, Lines
    3. sort command - Sort Lines of a File
    4. head Command - Show First Few Lines of a File
    5. tail command - Show Last Few Lines of a File
    6. tr command - Translate Characters
    7. cut command - Cut chars or Fields
    8. od - Octal Dump a File
    9. paste Command - Paste Lines
    10. awk command - Data Retrieval Language
    11. sed Command - Stream Editor