Go BackUNIX Shell Programming

Synopsis
Shell Programming presents the basics of shellprogramming using the Bourne shell, then covers additional features of the Korn and C shells.

Audience
This course is for anyone who is new to UNIX or wants to expand what they already know about UNIX.

Time
6 hours, based on viewing all pages.

Product Code: UNXTC4
After completing Shell Programming, the user should be able to:
 
Write basic Bourne, Korn and C shell programs
Add statements to perform commands conditionally
Build repetitions into a program
Use functions for programming efficiency
Handle unexpected signals from executing programs
Select a shell language for writing shell scripts

Bourne Shell Programming
Uses the Bourne shell to teach the basics of shell programming.  Shows how to use the common tools supplied with UNIX to create more powerful tools specific to the tasks users need to perform.
 
Passing arguments within shell programs
Using conditional tests for decision making
Building in loops for repetitive actions
Utilizing structured programming with functions
Debugging programs by tracing output


Korn Shell Programming
Reviews the Korn shell enhancements that apply to shell script writing.
 
Comparing Bourne and Korn shell conditional expressions
Declaring Korn shell functions
The Korn shell's extended variable support
Using arithmetic expressions in Korn shell programs
Writing programs that include the select statement


C Shell Programming
Looks mainly at the shell statements for flow control: the conditional statements if and switch and the loop control statements while and foreach.
 
Some of the unique features of the C shell
Using the @ command to evaluate arithmetic expressions
Writing C shell programs that include looping structures
Including the switch and source statements in your programs


Using Shell Scripts
Presents guidelines for choosing a shell for writing scripts for personal use and for public consumption.
 
Writing scripts for personal use
Writing scripts for public consumption
Selecting a shell language based on project requirements

This course is distributed with the UNIX Glossary.

 

Go Back