Course Outline
Introduction
- Course Objectives
- Agenda and Schedule
- Participant Introductions
- Prerequisites
- Recommended Reading
- Delegate Roles and Responsibilities
- Course Overview
Refresher on Fundamentals - Optional
- File Management
- Directories and Process Management
- List Directory Contents - ls
- Accessing Manual Pages - man
- Viewing File Contents - cat, more
- Basic Commands
- Piping Commands - using the | symbol
- Output Redirection - using the > symbol
- Appending Output - using the >> symbol
- Input Redirection - using the < symbol
- Redirecting Error Messages
- Discarding Output - using /dev/null
- Managing Foreground Processes
- Running Background Jobs - &
- Terminating Processes - kill
- Special Path Notations - . and ..
- Configuring the Prompt - PS1
- Defining Shell Aliases
- Utilising Shell Aliases
- Reviewing Command History
- Editing Commands with Arrow Keys
- Editing Commands with vi
- Customising Shell Behaviour
- Identifying Home Directory - HOME
- Checking Current Directory - pwd
- Navigating Directories - cd
- Creating New Directories - mkdir
- Deleting Empty Directories - rmdir
- Interactive File Copy - cp -i
- Interactive File Move - mv -i
- Interactive File Deletion - rm -i
- Recursive Deletion - rm -r
- Wildcards for File Name Matching
- Counting Words, Lines, Bytes - wc
- Locating Files - find
- Searching Text in Files - grep, sort, cut, uniq, tr
- Modifying Access Permissions - chmod
Shell Programming Basics
- Writing Shell Scripts
- Validating Commands
- Creating Script Files
- Granting Execute Permissions
- Testing Scripts
- Executing Scripts with time
- Executing Scripts with dot
- Replacing Shell with exec
- Running Scripts with ksh
- Debugging Techniques
- Passing Arguments to Scripts
- The read Command
- Incorporating read into Scripts
- Selecting the Appropriate Shell
- Formatting Output
- Disabling Echo - stty
Special Characters and Variables
- Understanding Quotation Marks
- Single and Double Quoting - ", '
- The Escape Character - *
- Backquotes - `
- Command Substitution - $(...)
- System Variables - set
- Other Special Shell Variables
- User-Defined Variables
- Removing Variables - unset
- Variables within Scripts
- The typeset Command
- Integer Arithmetic Variables
- Special Syntax Constructs
Building Interactive Menus
- Conditional Logic - case
- Constructing a Menu Interface
- Loops - while, until
- Pausing Output - sleep
- Pausing Output - dummy read
- Terminating the Script
- Breaking Loops
- Advanced Option - forking a shell
- Capturing Signals - trap
- Advanced Signal Handling
- Text Highlighting - tput
- Cursor Positioning - backtab \b
- Korn Shell Menu Implementation
Selection and Conditional Logic
- Conditional Tests
- Checking File Attributes
- Verifying File Permissions
- Complex Conditions - Nested ifs
- Multiple Conditions - elseif
- Negation - NOT Condition
- Combining Conditions in a Single Test
- String Comparisons
- Using Square Brackets for Tests
- Handling Null Input
- Numeric Comparisons
- Advanced case Statements
- Displaying Variable Values
- Spacing in Conditions
- Testing Command Exit Status
Iteration and Looping Structures
- Arithmetic Operations - let
- Loop Constructs - while, until
- Creating Infinite Loops
- Looping with for
- Handling Multiple Parameters - shift
Sub-scripts and Functions
- Scope: Local vs Global Variables
- Writing Sub-scripts
- Exporting Variables - Export Command
- Interpreting Exit Status
- Managing Aliases
- Defining Functions
- Commonly Used Functions
- Returning Status Codes
- Modifying Function Behaviour
- Implementing Functions in Scripts
Advanced Command-Line Utilities
- Debugging Mode - set
- Shell Settings - set
- Combining Data Sets - join
- Data Manipulation - paste, basename, dirname
- Managing Jobs - jobs
- Regular Expressions Overview
- Pattern Searching - grep
- Extended Regular Expressions - egrep
- Fixed-String Searching - fgrep
- Arithmetic Expression Evaluation - expr
- Mathematical Calculations – bc, eval Command,
- Processing Command Arguments
- Option Parsing - getopts Command
- Working with Arrays
Advanced Editing – vi & sed
- vi - Keyboard Shortcuts and Mappings
- Control Key Mapping
- Utilising Abbreviations
- Bulk File Editing
- Regular Expressions in Editing
- Global Insertion
- Here Documents,
- Stream Editor - sed, sed delete, -d, sed print, -p, sed suppress, -n, sed quit, -q, sed file, -f, sed Multiple Input, sed
- Search and Replace Operations
- sed Practical Example
Text File Processing - awk
- The awk Programming Language
- Matching Patterns
- Using Regular Expressions
- Comparative Pattern Matching
- Compound Pattern Logic
- Range-based Patterns
- Special Pattern Constructs
- Intrinsic Functions
- Diagnosing awk Scripts
- Passing Variables to awk
- String Containment Checks
- Formatted Output - printf
- Performing Calculations
- Custom Functions in awk
- String Extraction - substr
- String Length - length
- Executing Actions
- Flow Control Statements
- Array Operations
- Iterating Arrays with for Loops
- awk Practical Examples
Requirements
This course is designed specifically for individuals who possess a solid working knowledge of UNIX or have previously completed an Introduction to UNIX training.
Testimonials (4)
I liked the training because it was interactive, the trainer was knowledgeable, and the exercises helped me learn. The hourly breaks also kept me refreshed and focused.
Musat Robert
Course - UNIX/Linux Shell Scripting
I like the manner of presenting the theory and giving practical examples. Very well structured. I also like the fact that the trainer is always on time and has good communication skills.
Louise
Course - UNIX/Linux Shell Scripting
the constant feedback. possibility to ask questions and get the answers, get some working scripts which we were working on, modifying them and improving them at some point.
Nikita - DB Global Technology SRL
Course - UNIX/Linux Shell Scripting
Wojciech and NobleProg focused the itinerary to feet my needs.