Preferred method of contact:

Shell Programming

COURSE TYPE

Advanced

Course Number

434

Duration

3 Days

PDF Add to WishList

Customize your working environment for supercharged productivity with KornShell (ksh) and BASH shell (bash) — powerful command-interpreting languages for Linux, UNIX, and Mac OS. In this Shell programming training course, you gain the skills to write reusable, robust shell scripts, extend your user environment, and automate complex administrative tasks.

You Will Learn How To

  • Write Bash and KornShell scripts for improved productivity
  • Integrate arrays, functions, pattern matching, I/O, branches, loops, and variables
  • Improve speed with multifile handling and string manipulations
  • Create and reuse function libraries

Important Course Information

Recommended Experience:

  • User-level UNIX commands
  • Simple file editing with basic text, or GUI-based, editor
  • X Window System and basic UNIX networking

Software:

  • This course uses Red Hat Enterprise Linux
  • Concepts taught are applicable to all Linux distributions

Course Outline

  • Introduction and Overview
  • Benefits of KornShell and Bash vs. other shells
  • Differences between bash, ksh88 and ksh93
  • Integrating scripts with external command-line tools
  • 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
  • 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

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 . and source commands
  • Interacting with the Outside World

Manipulating files and redirecting data

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

Interacting with running processes

  • Handling errors
  • Processing external events
  • 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 actions

  • Accepting command-line arguments
  • Employing select to create a menu interface
  • Processing keyboard input
Show complete outline
Show Less

Convenient Ways to Attend This Instructor-Led Course

Hassle-Free Enrollment: No advance payment required to reserve your seat.
Tuition due 30 days after you attend your course.

In the Classroom

Live, Online

Private Team Training

In the Classroom — OR — Live, Online

Tuition — Standard: $2650   Government: $2355

Nov 29 - Dec 1 (3 Days)
9:00 AM - 4:30 PM EST
Toronto / Online (AnyWare) Toronto / Online (AnyWare) Reserve Your Seat

How would you like to attend?

Live, Online
In-Class

Jan 17 - 19 (3 Days)
9:00 AM - 4:30 PM EST
Herndon, VA / Online (AnyWare) Herndon, VA / Online (AnyWare) Reserve Your Seat

How would you like to attend?

Live, Online
In-Class

Feb 28 - Mar 2 (3 Days)
9:00 AM - 4:30 PM EST
New York / Online (AnyWare) New York / Online (AnyWare) Reserve Your Seat

How would you like to attend?

Live, Online
In-Class

Apr 4 - 6 (3 Days)
9:00 AM - 4:30 PM EDT
Ottawa / Online (AnyWare) Ottawa / Online (AnyWare) Reserve Your Seat

How would you like to attend?

Live, Online
In-Class

May 30 - Jun 1 (3 Days)
9:00 AM - 4:30 PM EDT
Toronto / Online (AnyWare) Toronto / Online (AnyWare) Reserve Your Seat

How would you like to attend?

Live, Online
In-Class

Jul 11 - 13 (3 Days)
9:00 AM - 4:30 PM EDT
Herndon, VA / Online (AnyWare) Herndon, VA / Online (AnyWare) Reserve Your Seat

How would you like to attend?

Live, Online
In-Class

Aug 29 - 31 (3 Days)
9:00 AM - 4:30 PM EDT
New York / Online (AnyWare) New York / Online (AnyWare) Reserve Your Seat

How would you like to attend?

Live, Online
In-Class

Guaranteed to Run

Show all dates
Show fewer dates

Private Team Training

Enrolling at least 3 people in this course? Consider bringing this (or any course that can be custom designed) to your preferred location as a private team training.

For details, call 1-888-843-8733 or Click Here »

Tuition

Standard

Government

In Classroom or
Online

Standard

$2650

Government

$2355

Private Team Training

Contact Us »

Course Tuition Includes:

After-Course Instructor Coaching
When you return to work, you are entitled to schedule a free coaching session with your instructor for help and guidance as you apply your new skills.

After-Course Computing Sandbox
You'll be given remote access to a preconfigured virtual machine for you to redo your hands-on exercises, develop/test new code, and experiment with the same software used in your course.

Free Course Exam
You can take your Learning Tree course exam on the last day of your course or online at any time after class and receive a Certificate of Achievement with the designation "Awarded with Distinction."

Prev
Next

Training Hours

Standard Course Hours: 9:00 am – 4:30 pm
*Informal discussion with instructor about your projects or areas of special interest: 4:30 pm – 5:30 pm

FREE Online Course Exam (if applicable) – Last Day: 3:30 pm – 4:30 pm
By successfully completing your FREE online course exam, you will:

  • Have a record of your growth and learning results
  • Bring proof of your progress back to your organization
  • Earn credits toward industry certifications (if applicable)

Enhance Your Credentials with Professional Certification

Learning Tree's comprehensive training and exam preparation guarantees that you will gain the knowledge and confidence to achieve professional certification and advance your career.

Earn 17 Credits from NASBA

This course qualifies for 17 CPE credits from the National Association of State Boards of Accountancy CPE program. Read more ...

“My course provided me with the critical skills I need, and my performance improved immediately upon returning to work.”

- K. McPartlin, Communications Analyst
The Credit Network

Prev
Next
Chat Now

Please Choose a Language

Canada - English

Canada - Français