UNIX & Linux Shell Scripting (BASH, Korn & Bourne)

UNIX & Linux Shell Scripting (BASH, Korn & Bourne)

Audience

This class is ideal for experienced programmers and support staff, who have some experience of UNIX or Linux based systems, and who will be implementing further applications and systems.

The course is suitable for delegates wishing to use the Korn, Bourne or BASH shell on all versions of UNIX and Linux (e.g., AIX, Solaris, HPUX, Red Hat, SUSE etc...). The course comprehensively covers all three shells, but can focus on any one if required.

Prerequisites

Attendees should have a good basic understanding of UNIX or Linux, ideally gained through our UNIX & Linux Essentials course. Knowledge of a standard UNIX/Linux editor (e.g., vi, vim) will be required.

Duration

3 days. Hands on.

Course Objectives

The course is highly interactive and consists of theory with plenty of hands on practical content.

This course will provide programmers and UNIX / Linux Support Staff with the skills necessary to construct extensive Shell scripts. By the end of the course, delegates will be able to confidently put together and maintain complex shell scripts.

The course covers Bourne, Korn and BASH scripting.

Course Content

UNIX & Linux Review
Major Components
The filesystem
Listing Directories
Creating Files
Displaying Files
Moving Around Directories
Redirection
Piping
Searching for a Pattern (grep)
Finding Files
User Security
Other Useful Commands

The Shell Environment
Shell Variables
Exporting variables
System Variables
The Back Quote
The Single Quote
The Double Quotes
The Backslash
Special Escape Characters
Recalling Previous Commands
Modifying Previous Commands

Shell Programming
Shell Scripts
Executing Shell Scripts
Passing Arguments To A Program
Positional Parameters
Special Shell Parameters
The Shift Command
Read Command
Expr Command
Korn Shell Arithmetic

Miscellaneous Commands
New Group
Cut and Paste
Comparing Files
Head and tail
Touching files
Grouping Commands
Shell Constructs
Typeset
Here Documents
Korn Shell Functions

Conditional Processing
Logical Constructs
The if Statement
Nesting if Conditionals
ELIF Statement
The Test Command formats
String Operators
Integer Operators
File Operators
Logical Operators
Case Statement

Conditional Looping
The For Command
For Statement Without Word List
The While Command
The Until Command
While True Command
Until False Command
The Break Command
The Continue Command

Additional Programming Topics
Shell Script Comments
The Exit Command
The Sleep Command
The Wait Command
The Set Command
The Unset Command
Special Variable Constructs
The Null Command
Signals used by Shell Procedures
Interrupt handling
Trace
Timing Command
getopts command
Korn Shell Arrays
Random Variable
Korn Shell Menu System
Programming Hints
Creating Efficient Shell Procedures
eval

The Stream Editor
The Stream Editor
Searching and Replacing Text
Deleting lines
Printing Lines
Edit Files

The Awk Utility
The awk utility
Operators
BEGIN and END
Arithmetic operators
Use of awk within a shell script

Virtual Courses

ALL of our courses can be delivered virtually. And our Bath public schedule of courses are now available as live virtual sessions, using the popular Zoom Virtual Classroom and remote labs. Delegates can test their access at: www.zoom.us/test

Public Courses

On-Site Courses

Can't attend one of our public classes? Booking for multiple people?

All our courses are available on your site! Delivered for your staff, at your premises.

Contact us to find out more...