UNIX Shell Programming
Course Description
Students learn to read, write, and debug shell scripts, thus increasing productivity by taking full advantage of the UNIX shell.
3 days
Contact us for pricing
Prerequisites
Participants should have attended an Introduction to UNIX course or have equivalent skills. The course is aimed at UNIX users, programmers and system administrators.UNIX Processes
What is a Process?Process Structure
The ps Utility
Options to the ps Utility
Background Commands (&)
Killing Background Processes
Redirecting the Standard Error
Getting Started
What is a Shell?Running Scripts
Specifying the Script’s Interpreter
The PATH Environment Variable
Sub-shells
Variables
Shell VariablesThe read Command
The export Command
The Shell Environment
Variable Substitution
Command Substitution
The Login Process
The Login ProcessThe System Profile Script
Your .profile Script
The . Command
Conditional Statements
The Exit Status of CommandsCommand Line Examples
The test Command
The if-then-else Construct
The elif Construct
case Statements
Loops
The for LoopThe while Loop
Reading Lines From Files
Using Arrays with Loops
Special Variables
$$ - PID of ShellCommand-Line Arguments
$# - Number of Arguments
$* - All Arguments
The shift Command
The set Command
Getting Options
Quoting Mechanisms
Single vs. Double QuotesWhat is a Here Document?
Using a Here Document
Here Document Quoting
Ignoring Leading Tabs
Functions
Shell FunctionsPassing Arguments to Functions
Returning Values from Functions
Function Libraries
Advanced Programming
Shell ArithmeticThe select Statement
Terminal Independence in Scripts
The eval Command
Debugging techniques
Using echoUsing Standard Error
Options for Debugging
Script Tracing
Conditional Debugging
Shell IPC
Co-processesThe print and read Commands
Signals
The trap Command
Named Pipes
The wait Command
UnixShell programmingshell scriptingLinuxLinux scriptingBashBash ScriptingUnix programmingUnix shellunix scriptingunix shell scripting