Shell Programming Training

Course 434

  • Duration: 3 days
  • Labs: Yes
  • Language: English
  • 23 NASBA CPE Credits (live, in-class training only)
  • Level: Advanced

In this Shell Programming training course you will learn to customize your working environment for supercharged productivity with KornShell (ksh) and BASH shell (bash) — powerful command-interpreting languages for Linux, UNIX, and Mac OS. You will learn to improve speed by performing multi-file handling and string manipulations without external tools, customize the user environment login scripts, and wrap external file and text handling tools within scripts.Learn Shell programming and gain the skills to write reusable, robust shell scripts, extend your user environment, and automate complex administrative tasks.

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

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

Shell Programming Training Delivery Methods

  • After-course instructor coaching benefit
  • Learning Tree end-of-course exam included
  • After-course computing sandbox included

Shell Programming Training Course Benefits

Write Bash and KornShell scripts for improved productivityIntegrate arrays, functions, pattern matching, I/O, branches, loops, and variablesImprove speed with multifile handling and string manipulationsCreate and reuse function libraries

Shell Programming Course Outline

  • Benefits of KornShell and Bash vs. other shells
  • Differences between bash, ksh88 and ksh93
  • Integrating scripts with external command-line tools

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

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

Manipulating strings

  • Extracting substrings
  • Determining string length

Mathematics

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

Function basics

  • Functions vs. scripts
  • Parameters and variables

Creating a function library

  • Finding your library with PATH
  • Dot . and source commands

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

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

Need Help Finding The Right Training Solution?

Our training advisors are here for you.

Course FAQs

Yes, shell scripts are computer programs run by the Unix shell, which is a command line interpreter. The dialects of shell scripts are scripting languages, and typical operations include file manipulation, program execution, and text printing.

This course uses a Red Hat Enterprise Linux distribution, however, the concepts covered are applicable to all Linux distributions.

Yes, the concepts covered in this course are applicable to all Linux distributions.

Yes! We know your busy work schedule may prevent you from getting to one of our classrooms which is why we offer convenient online training to meet your needs wherever you want, including online training.

Chat With Us