This course is designed for Unix/Linux users who need to write scripts for automating processes in the Unix/Linux environment. Whether a Systems Administrator, an End-User or a programmer this course will give you the insight into the Unix/Linux shell scripting language to enable you to automate everyday repetitive tasks, or create complex scripts to perform logic to more secure tasks.
The course is written to enable you to write scripts for Bourne (sh), Korn (ksh) or Bourne Again (bash), and highlights the differences as to when you can and cannot use particular functionality.

ON COMPLETION

  • Understand the shell environment and principles
  • Write scripts to automate everyday tasks, daemon processes, network or interprocess scripts
  • Make use of different commands and how they can interact
  • Use advanced pattern matching
  • Make your scripts more like Unix/Linux commands
  • Use arrays, functions, conditions and looping constructs
  • How Awk can help in scripts
  • Be capable of writing scripts to perform complex tasks

WHO SHOULD ATTEND?

If you have attended a Unix Fundamentals course, or if you are a Unix/Linux Administrator with experience and need to automate tasks in the Unix/Linux operating system, or provide logic to commands to allow other users to be able to perform tasks on the system then you should attend this course.

COURSE WORK

The course work is based around a 50/50 approach to lecture and hands on giving the attendee the chance to really work with the ideas and create some useful applications that cover the main areas of the topics.

PRE-REQUISITS

This course requires knowledge of the Unix/Linux command line. You should be able to navigate the Unix/Linux operating system, use a text editor such as VI, emacs, and be able to string commands together using pipelines. You should also be able to use the Unix/Linux help facility (man). If you have attended a Unix Fundamentals course, or if you are a Unix/Linux Administrator with experience then you can attend this course.

DURATION: 4 DAYS

PRICE: Call for latest

1st Day: Start 9:30am - Finish 5:00pm
Subsequent Days: Start 9:00am - Finish 5:00pm

COURSE CONTENT

Basics of Scripting

What are scripts, how to execute, process model and useful shell techniques such as grouping, redirection, daemons and options.

Shell Variables & Environment

Understand the difference in local and environment variables, how to manage them. Use of aliases, parameter passing and arithmetic.

Quoting Mechanism

What the different quotes do, the effect of quotes on wildcards and variables, and capturing output.

Using Print and Read

Difference in print commands and their uses, and how to get interactive user input.

Conditions

What are conditions, the different syntaxes, logical operators, options, short-circuits and alternative conditional statements.

Definite Loops

What is a definite loop, the types of definite loops and how to use them.

Indefinite Loops

What is an indefinite loop, the types of loops and how to use them. Controlling exits, use of redirection and nesting.

Pattern Matching

Built-in Shell pattern matching used in conditions. Sub-string manipulation within the Shell, using grep and egrep in your scripts and enhancing the case statement.

Advanced Variables

Variable manipulation, such as readonly variables, changing case. Getting the length of a variable, setting default values and using arrays.

Functions

What are functions, where to use them, writing and using them. Passing values, returning values, scope and debugging.

Power Commands

Use of various filter commands within the Unix environment for scripters, and the use of sed.

AWK in Shell

What is AWK, how it is used, how it can help in Shell scripts.

Scripts with Options

Syntax of real Unix/Linux commands. How to implement options in your shell scripts.

Interprocess Communications

What is Interprocess Communication? Why you might need it. How to use it in shell scripting.