Individuals requiring a mastery of the command line interface to the
UNIX operating system. This includes system administrators,
programmers, and developers. Shell scripting is the simplest way to
automate tasks on UNIX systems and this course provides excellent
coverage of the shell and its associated facilities. The
Advanced Korn Shell Programming course follows this one and provides
an in-depth look at shell features that go beyond ordinary use.
- Review of Useful Shell Commands
- Tools for Text Files (
head and tail, cut, grep)
- File Management Commands (
find, chmod, cp/mv)
- Overview of Other Scripting Languages (
awk, sed, perl)
- Shell Basics
- Using Redirection and Pipes
- Wildcards (including the extended wildcards)
- Command and Variable Substitution
- Creating and Using Shell Scripts
- Single and Double Quotes
- Command Line Parsing
- Login and Shell Startup Scripts
- Process Lifecycle
- Terminology (
process, parent/child, and more)
- Monitoring Commands (
ps, top)
- How Shell Scripts are Executed
- Using
nohup and nice
- Background Processing
- Signals and Killing Processes
- Shell Scripting, Part 1: Basics
- Why Shell Programming?
- Steps to Creating a Script
- Menu Building Example Using
select
- Commenting Your Shell Scripts
- Working with Variables
- Parameter Substitution Modifiers
- Introduction to Indexed Arrays
- Proper Use of Error Messages
- Performing Arithmetic in the Shell With
(( )) and let
- Using
expr for String Matching (deprecated)
- Interactive Shell Scripts Using
read
- Shell Scripting, Part 2: Flow Control
- Control Flow:
if-then-else
- Test Operations (
test, [ ], and [[ ]])
- Control Flow:
for Loops
- Control Flow:
while Loops
- Changing the Script Parameters
- Changing Loop Flow (
break and continue)
- Multi-choice
case Statements
- Exiting a Shell Script
- Using
select to Build a Menu
- Shell Scripting, Part 3: User Interaction
- Using
getopts For Handling Options
- Temporary Files
- The
trap Command
- Debugging Options in the Korn Shell
- Shell Scripting, Part 4: Efficiency
- Subshells and IO Redirection
- Conditional Execution
- Floating Point Arithmetic
- Example of Using Coprocesses
- HERE Documents
- Introduction to Shell Functions
- Appendix: Using
ksh
- Korn Shell Startup Sequence (
/etc/profile, .profile, $ENV)
- Command Line Editing
- Using the Command History and Command Alias Facilities
- Korn Shell Job Control
- The Shell Environment
Upon completion of this course, the student will be able to
write Korn Shell scripts using the following features and more:
Students are invited to bring their current ideas and questions to the
classroom for discussion. Case studies, lecture, group problem
solving, and online laboratories will be used. Students will be
encouraged to enhance their skills utilizing the techniques presented
through classroom problem solving and controlled online workshops.
Familiarity with UNIX commands, directory structure, and the text
editor is required; this course includes a short review of some basics,
but proficiency with the system editor is required.
Programming skills are not required, but are helpful.