Course Description

During this 4 day intensive training workshop students learn to read, write, and debug shell scripts, thus increasing productivity by taking full advantage of the BashShell. Approximately 70% of this course is spent on varied lab exercises from simple to more complex scripting.



3 days


Target Audience

IT Professionals, Linux or UNIX users, programmers, and system administrators.


Course Prerequisites

The skills required for those who wish to attend this course can be learned by attending any of the following GuruTeam courses, or equivalent training programmes.

If you have any questions or doubts as to whether you meet the pre-requisites for this course, or indeed are wondering which course best suits you, please contact us to discuss your suitability for course attendance.


Suggested Follow on Courses

There are a number of options of suitable follow-on courses, depending on your business needs. Please contact us for further details.


Course Content

1. Course Introduction

Course Objectives

Course Overview

Using the Workbook

Suggested References and Reading

2. UNIX Processes

What is a Process?

Process Structure

The ps Utility

Options to the ps Utility

Background Commands (&)

Killing Background Processes

Redirecting the Standard Error

3. Getting Started

What is a Shell?

Running Scripts

Specifying the Script’s Interpreter

The PATH Environment Variable


4. Variables

Shell Variables

The read Command

The export Command

The Shell Environment

Parameter Expansion

Command Substitution

5. The Login Process

The Login Process

The System Profile Script

Your .bash_profile Script

The . Command

6. Conditional Statements

The Exit Status of Commands

Command Line Examples

The test Command

The if-then-else Construct

The elif Construct

case Statements

7. Loops

The for Loop

The while Loop

break and continue

Reading Lines From Files

Using Arrays with Loops

8. Special Variables

$$ – PID of Shell

Command-Line Arguments

$# – Number of Arguments

$* – All Arguments

The shift Command

The set Command

Getting Options

9. Quoting Mechanisms

Single vs. Double Quotes

What is a Here Document?

Using a Here Document

Here Document Quoting

Ignoring Leading Tabs

10. Functions

Shell Functions

Passing Arguments to Functions

Returning Values from Functions

Function Declarations

11. Advanced Programming

Shell Arithmetic

The select Statement

Terminal Independence in Scripts

The eval Command

12. Debugging Techniques

Using echo

Using Standard Error

Script Tracing

Options for Debugging

Conditional Debugging


See more Linux/Unix courses