Course Search:

Request more details:


Advanced Unix (Korn) Shell Scripting

Description:
This course is designed to provide the required skills needed to utilize the new version of the Korn shell (ksh93) and its more advanced features. Students will learn to write with arrays, open and utilize file descriptors three and beyond, do timed reads, develop functions, and use co-processes and named pipes.
  • Cost: Price on application
  • Duration: 3 Days
  • This course is not available as part of our public schedule but can be provided on a customised client specific basis.
Prerequisites:
Working knowledge of developing software applications
Working knowledge of Korn shell scripting
Working knowledge of object-oriented language is helpful
Basic experience in ksh88 or pdksh
Course Audience:
This course is aimed at Systems Developers, Systems Administrators, Application Developers and Application Programmers
Course Topics:
Working with The “putty.exe” Application :
Using PuTTY
Customizing PuTTY
Fonts in PuTTY
Setting the text and background colors
Save settings for next login
Login at ETC
Changes to PuTTY on the fly
PuTTY window
Different “ksh” versions
“ksh93”
Write a script to determine your shell
Review of Basic Commands :
Shell variables
Special shell variables
Variable assignment
The “test” function
“If-then-else” logic
“If-then-else” logic (cont)
“elif” logic
The “for” loop
The “read” command
Reading files with a “for” loop
Reading files in “while” loops
The “select” command
The “case” command
Positional parameters and the “set” command
The “IFS” variable
The “eval” command
“eval” example with the “cut” command
Determining string length
Sub-strings with “expr”
The “dot“ command
Command substitution
ksh93 Alternatives :
The Old “test” function
The “[[ ]]” syntax
The “(( ))” syntax
Using “(( ))” with “for” loops
The “? :” ternary operator
File I/O :
Accessing files with “exec”
The “read” command
The “print” command
The “echo” command
The “printf” command
Typesetting and Arrays :
Data types
“String” data type
“Integer” data type
“Floating point” data type
“Constant” data type
“Pointer” data type
“Associative array” data type
Declaring an “array”
Referencing “array” values
Declaring a “structure”
Declaring a pseudo structure
Declaring a compound variable structure
Command Line Processing :
The command line
What “getopts” does
“getopts” usage
The “getopts” option list
Unknown Arguments on the command line.
Using “while, case, and shift” With “getopts”
Using Functions :
Displaying functions
Declaring a function
Maintaining functions
Developing a function
“exit” and “return” commands
Variables and functions
Passing arguments to functions
Capturing Values from functions
Inter-Process Communication (IPC) :
Launching jobs from within a script
Co-processes
Multiple Co-processes
Named pipes
Signals and “traps”
Using “traps” in your scripts
Special “traps”
The “wait” command
The shell “logical and” - “&&”
The shell “logical or” - “||”
The “case” command
The “here” Document :
Here “<<“ input redirection
“<<“ syntax
“<<“ example
Turn off shell processing
Indent your text lines
Functions:
Displaying functions
Declaring a function
Maintaining functions
Developing a function
“exit” and “return” commands
Variables and functions
Passing arguments to functions
Capturing values from functions
Controlling Execution of Scripts :
The “wait” command
The shell logical and “&&”
The shell logical or “||”


Dublin: 01 6627700 - Cork: 021 4319010 - Limerick: 061 311982

© Professional Training Solutions Limited 1996-2012
CRO No. 252390 - Unit 22, Westland Square, Pearse Street, Dublin 2, Ireland.