0845 450 6120

Multi-vendor Korn Shell Programming

Regular users of UNIX know that using advanced commands, shell features and shell scripts, improves efficiency and productivity as well as enhancing their use of Unix. Most users discover these capabilities in an ad-hoc and inefficient way, learning by trial and error and without understanding the concepts behind the features they use. This course focuses on the capabilities of the UNIX shell and the utilities commonly used in the development of shell scripts, interpreted programs.

The course is run using the Korn shell, a superset of the original UNIX Bourne shell, which is rapidly becoming the shell of choice for most users. Korn-only features are highlighted at each stage, making this course suitable for users of either shell. Having said that, those that use BASH (typically on Linux) should consider attending the  Mastering BASH scripting course instead.

The course concentrates on the common approach to the variants of UNIX while looking at some specific areas of various systems and shells, and is particularly suitable for companies which take a multi-vendor open systems view, and is applicable to all flavours of Unix including Linux, HP-UX, UnixWare, Solaris, AIX, etc. The platform used for practical exercises is Linux.

We don't currently have any courses listed for Multi-vendor Korn Shell Programming, would you like to view all courses for Linux & Unix?

Learning Objectives

Delegates will learn how to

  • use all significant features of the UNIX shell
  • Implement advanced variable and array manipulation
  • Develop shell scripts that contain advanced decision making constructs
  • Use the tracing features to speed the development of shell scripts
  • Implement advanced data stream handling by using co-process communication
  • Incorporate functions in script design
  • Integrate Korn shell script with those written using other shells
  • Write reliable, maintainable and efficient shell scripts
  • Understand the existing system scripts, thus enhancing knowledge of the system
  • Make user scripts appear and behave as integral system interpreted programs


Delegates must have a good working knowledge of the Unix system. Some practical understanding of programming concepts is also required. Typically, delegate skills will include a working knowledge of UNIX commands and utilities, proficiency in using a generic UNIX file editor, preferably vi, and familiarity with programming concepts, such as batch processing, loops, decision-making constructs.

Course Content


  • What is a shell?
  • Types of shell


  • Redirection and pipes
  • Wildcards
  • Creating shell scripts
  • The .profile file
  • Grouping commands and background execution


  • Tilde expansion
  • The whence command
  • Quoting; Using aliases
  • The ENV file
  • Here documents
  • Job control


  • Setting and getting variables
  • Using ${} and $()
  • Exported, read only and predefined variables
  • Length of variables


  • Positional parameters
  • Counting parameters
  • Using shift
  • Parameters and set

Making Decisions

  • Exit status
  • If-then
  • If-then-else
  • If-then-elif-then-else
  • Tests
  • The case statement
  • Logical tests
  • More pattern matching


  • The while and until loops
  • The for loop
  • Break and continue
  • The select command
  • I/O redirection and loops
  • The getopts command

Arithmetic in the Shell

  • Declaring integer variables
  • Operators
  • The let keyword
  • Making arithmetic tests
  • Using other bases


  • Writing functions
  • Return values from functions
  • Autoload
  • Local versus global variables
  • Listing and removing functions

Debugging in the Shell

  • Setting the xtrace option
  • The trace prompt
  • Tracing functions
  • Traps

Handling Arrays

  • Accessing elements
  • Setting elements
  • Counting the elements in an array

Professional Scripts

  • Organising project files
  • Enhancing script behaviour with getopts

More Complicated I/O

  • Putting files onto file descriptors
  • Read and print revisited
  • Co-processes

Introduction to sed and awk

  • Simple instructions
  • Script files
  • Regular expressions
  • Addressing in sed
  • Grouping commands in sed
  • The main awk loop
  • Referencing fields
  • Predefined awk values
  • Variables, operators
One Month
Two Months
Three Months
More than Three Months
PRINCE2 Foundation & Practitioner
MSP Foundation & Practitioner
APMP Certificate
ITIL Foundation
Scrum in One Day
Certified ScrumMaster
ISTQB Software Test Foundation
Microsoft Project
BCS Business Analysis Practice
Other - Please Specify Below

Online Courses

You may prefer an online course if you are looking for a flexible and cost-effective solution. Online courses allow you to study at your own pace, at a time that suits you.

We have the following eLearning options available:

Our Customers Include