Home Contact Resources Training Profile Clients Careers


Shell Programming


Length: 3 days
CourseID: shell



Prerequisites:

Introduction to UNIX


Overview:

This course is intended for knowledgeable UNIX users with System Administrator duties that need to extend their UNIX knowledge and learn learn programming techniques.


Objectives:

  • Review some basic UNIX commands
  • Learn conditional statements
  • Learn loops
  • Learn arrays and string operators

  • Chapters:


    Introduction

    What is Shell Programming? Benefits Of Shell Versus C Language
    Getting Started

    Conditional Statements

    Quotes Single Quotes
    Double Quotes Back Quotes
    Command Substitution - Alternate Syntax Escape Character (\)
    Redirection Regular Expressions
    Filters GREP / EGREP
    SORT WC
    TR CUT
    ED ED/SED Commands
    SED AWK Overview

    The WHILE Loop

    Types of VariablesNaming of Variables Assigning a Value to a Variable
    Using the Value of a Variable Built-in Variables
    User-Defined Variables Positional Parameters (Variables)
    Special Positional Parameters Variables Read From Input
    The READ command The SET and EXPORT Commands
    Integer Variables The TYPESET Command
    Using LET for Arithmetic Expressions Enclosing a Variable Name Within Braces - '{}

    The CASE Statement

    Exit (return) Status Determining the Exit Status of a Command
    The IF Statement The EXIT Command
    The TEST Command The TEST Command - The '[' Syntax
    The TEST Command - Numeric Comparisons The TEST Command - File/String Attributes
    The IF-THEN-ELSE Statement The Nested IF Statement
    The IF-THEN-ELIF Statement The "&&" and "||" Conditional Operators
    Debugging A Shell Program The SET Command
    Documenting a Shell Program

    Miscellaneous Other I/O Topics

    The WHILE Loop The BREAK Command
    The SHIFT Command The CONTINUE Command
    The TRUE and FALSE Commands The FOR loop

    Arrays and String Operators

    The CASE Statement The SELECT Loop
    FUNCTIONS The RETURN Command