Solaris Korn Shell Programming

5 Day Course
Hands On
Code SSPD

Book Now - 2 Delivery Methods Available:

Classroom Virtual Classroom Private Group - Virtual Self-Paced Online

Overview

This Sun Microsystems Solaris 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 Solaris tools to manipulate text and incorporate into Solaris shell scripts.

The delegates will practise:

  • 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
  • Scheduling background jobs using cron and at
  • Using file comparison utilities
  • Using the head and tail utilities
  • Using the cut and paste utilities
  • Using split and csplit
  • Identifying and translating characters
  • Sorting files
  • Using regular expressions
  • Translating characters in a file
  • Selecting text from files with the grep family of commands
  • Editing text files with sed
  • Creating programs with awk

Please note:

This 5-day Solaris Korn Shell Programming course combines the Solaris Shell Programming and Solaris Advanced Shell Programming Tools courses. If the dates allocated to this 5-day course are not suitable, then this course can also be booked by selecting dates from both the Solaris Shell Programming and the Solaris Advanced Shell Programming Tools courses. The Shell Programming course should be attended first and may start on either a Monday or a Thursday.

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

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

Review of Shell Fundamentals (1 topic)

  • Review of UNIX Commands

Using Unix Shells (6 topics)

  • Command line history and editing
  • The Korn and POSIX shells
  • The Bash shell
  • Command aliasing
  • The shell startup file
  • Shell environment variables

Redirection, Pipes and Filters (7 topics)

  • Standard I/O and redirection
  • Pipes
  • Command separation
  • Conditional execution
  • Grouping Commands
  • UNIX filters
  • The tee command

Backup and Restore Utilities (6 topics)

  • Archive devices
  • The cpio command
  • The tar command
  • The dd command
  • Exercise: Backing up and restoring files using tar
  • Exercise: Backing up and restoring files using cpio

Background Job Scheduling (7 topics)

  • Starting background jobs
  • Background tasks and the nohup command
  • Process priorities and the nice command
  • Job control
  • Scheduling jobs with the at command
  • Scheduling jobs with the cron command
  • Exercise: Running and background jobs

Regular Expression Notation (2 topics)

  • Regular expressions
  • Extended regular expressions

Searching Files for Patterns (5 topics)

  • The grep family of commands
  • The grep command
  • The fgrep command
  • The egrep command
  • Exercises: Search for patterns with grep and egrep

The Stream Editor - SED (10 topics)

  • Introduction and command line syntax
  • The sed program structure
  • sed program processing
  • Use sed commands
  • sed addresses
  • sed instructions
  • Hold and get functions
  • Advanced flow control
  • Exercises: Simple text processing with sed
  • Exercises: Create sed scripts to edit files

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
  • Exercise: Identifying file differences

File Manipulation Commands (7 topics)

  • The head and tail commands
  • The cut command
  • The paste command
  • The pr command
  • The split and csplit commands
  • Exercises: Manipulate text with cut and paste
  • Exercises: Manipulate text with head and tail

Identify and Translate Characters (6 topics)

  • od - octal dump
  • Use cat to display non-printing characters
  • The expand and unexpand commands
  • The tr command
  • Exercises: Translating text files with tr
  • Exercises: Display non-printing characters

Sorting Files (5 topics)

  • The sort command
  • Specify sort keys with -k
  • Sort by column positions
  • The uniq command
  • Exercises: Sorting text files

Introduction to the Pattern Scanning Utility - AWK (16 topics)

  • Introduction and command line syntax
  • The awk program structure
  • Use regular expressions
  • Operators
  • Simple patterns
  • Extended patterns
  • Comments
  • Special patterns (BEGIN and END)
  • Program variables
  • Built-in variables
  • User defined variables
  • Mathematical operators
  • Enhanced printing
  • Handling user variables
  • Exercises: Create simple awk scripts
  • Exercises: Create a simple awk script using variables

AWL Program Control Structures (13 topics)

  • Program control structures
  • The if construct
  • The while and do ... while constructs
  • The basic for construct
  • Associative array handling
  • Functions
  • Built in functions
  • The system function
  • The getline function
  • User defined functions
  • Exercises: Create an awk script using an associative array
  • Exercises: Create an awk script using a for loop and if statement
  • Exercises: Create an awk script using functions

Prerequisites

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

Additional Learning

The courses below may help you meet the knowledge level required to take this course.

Scheduled Dates

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

Pricing

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 Sep Oct Nov Dec Jan Feb
SSPD
Virtual Classroom (London)
5 Days $2,435

Course PDF

Print

Share this Course

Share

Recommend this Course

Sections