Learning Tree International

UNIX, Linux, and Open Source Training

1-888-THE-TREE (1-888-843-8733)
 

Request Info

Salutation

First Name

Last Name

Job Title

Department

Mailstop

Company

Address

P.O. Box

City

State

Zip Code

Country
List

Work Phone

Extension

E-mail

A representative will contact you to follow up your request.

Privacy Statement

 

Shell Programming: Hands-On

Shell Scripting Using Bash and KornShell


Course 4343 Days

  E-mail   Print   Q&A   PDF   Facebook   Twitter

Quick Enroll

You Will Learn How To

  • Write Bash and KornShell scripts for improved productivity
  • Integrate all key language features: arrays, functions, pattern matching, I/O, branches, loops and variables
  • Improve speed by performing multifile handling and string manipulations without external tools
  • Launch and control additional processes
  • Wrap external file and text-handling tools within scripts
  • Customize and extend the user environment login scripts

Course Benefits

KornShell (ksh) and Bash have evolved into full-featured programming languages with efficient built-in modern constructs for superior string handling, decision making, arithmetic and postprocessing. This hands-on course provides the skills you need to write reusable, robust shell scripts to extend the user environment and automate complex administrative tasks.

Who Should Attend

Administrators, developers and other professionals using shell programming for improved productivity. Knowledge of UNIX or Linux at the level of Course 428, "UNIX Comprehensive Introduction," or Course 143, "Linux Comprehensive Introduction," is assumed.

Hands-On Training

Throughout this course, you write a series of Bash or KornShell scripts that build in complexity as you master each new construct. Instructor-led exercises include:
  • Creating loops and making decisions using case, while and if
  • Performing text-processing tasks using IFS and read
  • Breaking a large program into functions
  • Handling errors with default values
  • Handling unexpected events with trap
  • Manipulating multiple files

Course 434 Content

Introduction and Overview

  • Role of shell scripting
  • Benefits of KornShell and Bash vs. other shells
  • Differences and similarities between bash, ksh88 and ksh93
  • Integrating scripts with external tools: grep, sed, awk and others
  • Customizing the login environment

Bash and KornShell Scripting Fundamentals

Shell script elements

  • Commands and comments
  • Defining exit values

Conditional program execution

  • Applying if and case statements
  • Simplifying if logic with elif

Program loops and iteration

  • Conditional looping with while and until
  • Listing for loops

Testing files and directories

  • Analyzing attributes
  • Checking file size and contents

Strings and patterns using [[ ]]

  • Comparing strings
  • Verifying the existence of a string
  • Pattern matching and special characters

Debugging

  • Redirecting standard error
  • set commands for debugging

Storing and Accessing Data

Positional parameters

  • Passing and accessing parameters
  • Setting and unsetting parameters
  • Manipulating parameters as groups

Shell variables

  • Defining environment and local variables
  • Specifying default values and error conditions

Arrays

  • Creating and indexing arrays
  • Processing array contents with special variables

Processing Data

Manipulating strings

  • Extracting substrings
  • Determining string length
  • Find and replace

Mathematics

  • Arithmetic for and while loops
  • Writing mathematical expressions: (( )), $(( )) and let

Modular Programming with Functions

Function basics

  • Functions vs. scripts
  • Parameters and variables

Creating a function library

  • Finding your library with PATH
  • dot . commands

Interacting with the Outside World

Manipulating files and redirecting data

  • Scripting file and directory management
  • Deciphering redirection order
  • Unraveling the secrets of exec: opening and closing multiple files

Interacting with running processes

  • Handling errors
  • Defining posttermination actions such as notification, cleanup
  • Handling and sending signals: trap and kill

Accessing network servers

  • Connecting to a network server
  • Exchanging data with a network server

Creating "Production Quality" Scripts

Ensuring environmental control

  • Checking and modifying environment variables
  • Using getopts to process command line options

Handling user interactions

  • Setting up error processing
  • Employing select to create a menu interface
  • Processing keyboard input

<< Back to UNIX, Linux, and Open Source Course List
 

Related Courses


Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of X/Open Company, Limited.
 
Shell Programming: Hands-On
Hands-On Training

Course Dates

Sep 8-10Reston, VA enroll
Oct 27-29New York enroll
Jan 26-28Rockville, MD enroll
Feb 23-25New York enroll
Jun 22-24New York enroll
Jul 13-15Reston, VA enroll
Live online classroom training.

Attend highlighted events
in person or online with Learning Tree AnyWareTM.

More Dates and Locations.

On-Site &
Custom Training

Bring this or any Learning Tree course to your location or have it customized for your organization.

Tuition

$ 2,490 Standard Tuition
Tuition with a Savings Plan
$ 1,623Premium-Pass
$ 1,833Training Passport
$ 2,250Voucher 10-Pack
$ 2,213Government Discount
$ 2,240Alumni Gold Discount
 
Shell Programming: Hands-On

Participants writing shell programs on UNIX and Linux.


 
"A Learning Tree Course can really expedite learning. Taking one of their courses proves that you've done your homework and have been taught properly."

– M. Yake
Commonwealth Solutions, Inc.

 
Open Source Software: An Overview and Outlook

CPE 17 Credits 1 Hour(s) College Credit