Multi-vendor Korn Shell Programming

4 Day Course
Hands On
Code MVUXKSH-1

Book Now - 1 Delivery Method Available:

Scheduled Online Onsite

Overview

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 Bash Shell Programming 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.

Training Partners

We work with the following best of breed training partners using our bulk buying power to bring you a wider range of dates, locations and prices.

Modules

Hide all

Introduction (2 topics)

  • What is a shell?
  • Types of shell

Review (5 topics)

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

Overview (6 topics)

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

Variables (4 topics)

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

Parameters (4 topics)

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

Making Decisions (8 topics)

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

Loops (6 topics)

  • 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 (5 topics)

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

Functions (5 topics)

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

Debugging in the Shell (4 topics)

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

Handling Arrays (3 topics)

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

Professional Scripts (2 topics)

  • Organising project files
  • Enhancing script behaviour with getopts

More Complicated I/O (3 topics)

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

Introduction to sed and awk (9 topics)

  • Simple instructions
  • Script files
  • Regular expressions
  • Addressing in sed
  • Grouping commands in sed
  • The main awk loop
  • Referencing fields
  • Predefined awk values
  • Variables, operators

Prerequisites

Delegates must have a good working knowledge of the Unix system. This can be gained by attending the UNIX Fundamentals course. 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.

Additional Learning

The courses below may help you meet the knowledge level required to take this course. If you are unsure please ask a training advisor .

or call:408-759-5074

Course PDF

Print

Share this Course

+1
Share

Recommend this Course

Sections