AIX Korn Shell Programming

5 Day Course
Hands On

Book Now - 3 Delivery Methods Available:

Classroom Virtual Classroom Private Group - Virtual Self-Paced Online


IBM AIX Korn Shell Programming training course is designed to give delegates practical experience in developing and writing shell scripts. Most of the built-in shell commands are introduced together with the main program control structures. The course also gives practical experience using a range of IBM AIX tools to manipulate text and incorporate into AIX shell scripts.


The delegate will learn and acquire skills as follows:

  • Writing simple scripts to enhance basic command output
  • Using the various shell quoting mechanisms appropriately
  • Manipulating shell variables and user-defined variables in scripts
  • Implementing conditional execution facilities
  • Using the shell's built-in loop constructs where appropriate
  • Writing scripts to trap user interrupts
  • User defined Functions
  • Developing menu-driven shell scripts
  • Backing up and restoring files with tar
  • File compression
  • Scheduling background jobs with crontab and at
  • Comparing file contents
  • Splitting files
  • Identifying and translating characters
  • Review of regular expressions
  • Editing text files with sed
  • Pattern scanning and report generating with awk
  • Debugging awk scripts
  • Miscellaneous commands

Target Audience

Programmers, developers and system administrators who need to construct shell scripts using advanced text handling facilities.

Additional Information

  • Course technical content is subject to change without notice.
  • Course content is structured as sessions, this does not strictly map to course timings. Concepts, content and practicals often span sessions.

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.


Collapse all

Unix Command Review (3 topics)

  • Basic UNIX commands
  • Filename generation characters
  • Redirection and pipes

Getting Started (6 topics)

  • What is a shell script?
  • Development guidelines
  • Creating and editing shell scripts
  • Naming and storing shell scripts
  • Executing shell scripts
  • Exercise: Create and run a simple shellscript

Using Variables (8 topics)

  • Environment variables
  • Local variables
  • Assigning values to variables
  • Accessing variable values
  • Using quotes
  • Delimiting variable names
  • echo control sequences
  • Exercises: Use variables in shellscripts

Integer Arithmetic (3 topics)

  • Using the expr command
  • Using the (( )) notation
  • Exercises: Use integer arithmetic in shellscripts

Handling Run Time Input (3 topics)

  • The read command
  • Command line arguments and related variables
  • Exercise: Writing an interactive shell script

Condition Testing (10 topics)

  • The if-then-elif-else statement
  • String tests
  • Integer tests
  • Filename tests
  • Other test notations
  • Default and substitute variables
  • Exit status codes
  • Counting characters
  • Testing for numeric input
  • Exercise: Add validation to previous scripts

Loop Constructs (6 topics)

  • The while loop
  • The until loop
  • The while true and until false loops
  • The for loop
  • Loop control commands
  • Exercises: Enhance the previously written scripts with loop constructs

Multi-Branch Decisions (4 topics)

  • The case statement
  • Patterns and actions
  • Menu driven applications
  • Exercise: Develop and write a menu system

Functions (3 topics)

  • What is a function?
  • Function syntax
  • Exercises: Create and use functions

Interrupt Handling (4 topics)

  • Interrupt signals
  • The trap command
  • Abnormal termination of scripts
  • Exercise: Adding traps to the menu script

Additional Features (5 topics)

  • The exec command
  • The includes notation
  • Arrays
  • Here Documents
  • Exercise: Enhance scripts

Backup and Restore Utilities (4 topics)

  • The tar command
  • Compression utilities gzip, bzip2, zip and compress
  • Exercise: Backing up and restoring files using tar
  • Exercises: Compressing files

Background Job Scheduling (3 topics)

  • Scheduling jobs with the cron command
  • Scheduling jobs with the at command
  • Exercises: Running background jobs

Commands for Comparing Files (5 topics)

  • Compare two files with the cmp command
  • Compare two files with the comm command
  • Compare two files with the diff and sdiff commands
  • Compare large files with the bdiff command
  • Exercises: Identifying file differences

Splitting Files (2 topics)

  • The split and csplit commands
  • Exercises: Splitting files

Identifying and Translating Characters (5 topics)

  • od - octal dump
  • Use cat to display non-printing characters
  • The expand and unexpand commands to convert between tab and space characters
  • The tr command for character translation
  • Exercises: Translating characters with tr

Regular Expression Notation Review (2 topics)

  • Standard regular expressions
  • Extended regular expressions

The Stream Editor - sed (8 topics)

  • sed command line syntax
  • sed command processing
  • Pattern space
  • sed addresses
  • sed commands
  • Hold and get functions
  • Advanced flow control
  • Exercises: Text processing with sed

Introduction to the Pattern Scanning Utility - awk (10 topics)

  • Introduction and command line syntax
  • The awk program structure
  • Operators
  • Simple patterns
  • Extended patterns
  • Special patterns (BEGIN and END)
  • Program variables: Built-in variables, User defined variables, Arrays
  • Mathematical operators
  • Displaying output with print and printf
  • Exercises: Create awk scripts to extract selected data from a file and generate reports

awk Program Control Structures (7 topics)

  • Program control structures
  • The if construct
  • The while and do ... while constructs
  • The basic for construct
  • Associative array handling
  • Functions: Mathematical and string functions, The system function, The getline function, User defined functions
  • Exercises: Create an awk script using an program control structures and arrays

Debugging awk Scripts (2 topics)

  • Responding to Syntax errors
  • Responding to Logical errors

Miscellaneous Tools (8 topics)

  • bc (calculator)
  • fuser (testing for files in use)
  • getops (checking options passed to shell scripts)
  • printf (formatting screen output)
  • logger (script logging)
  • xargs (generating arguments for a command)
  • eval (re-evaluating variables)
  • Exercises: Using tools within a shell script


The AIX Korn Shell Programming course assumes knowledge of the AIX Operating System to the level covered in the AIX Basics course. Some programming experience may also prove advantageous.

Scheduled Dates

Please select from the dates below to make an enquiry or booking.


Different pricing structures are available including special offers. These include early bird, late availability, multi-place, corporate volume and self-funding rates. Please arrange a discussion with a training advisor to discover your most cost effective option.

Code Location Duration Price Feb Mar Apr May Jun Jul
Later scheduled dates may be available for this course.

Course PDF


Share this Course


Recommend this Course