Course Code: 5585

Linux Shell Scripting

Class Dates:
1/6/2022
Length:
2 Days
Cost:
$995.00
Class Time:
Technology:
Desktop
Delivery:
Instructor-Led Training, Virtual Instructor-Led Training

Overview

  • Course Overview
  • Linux Shell Scripting is designed to provide the skills necessary to automate tasks on a Unix or Linux system. Systems Administrators and Developers alike can avoid errors, save time and money by replacing repetitive work patterns with shell scripts. Care has been taken to present this course in a format that benefits all students, with or without previous programming experience.

Prerequisites

  • Solid understanding of Unix-based systems and proficiency on the Unix or Linux command line.

    Supported Distributions:

    Red Hat Enterprise Linux 7
    SUSE Linux Enterprise 12

Course Details

  • 1. INTRODUCTION TO THE SHELL
  • Shell Script Strengths and Weaknesses
  • Shells, Switching User Contexts
  • Example Shell Script
  • Shell and Environment Variables
  • Key Environment Variables
  • Which and Type, General Quoting Rules
  • Nesting Commands, Help from Commands and Documentation
  • whereis, Getting Help Within the Graphical Desktop
  • Getting Help with man & info
  • LABS: Shell Variables
  • Shell Meta-Characters
  • Command Substitution
  • 2. SHELL SCRIPTING BASICS
  • Positional Parameters
  • Input & Output
  • printf
  • alias
  • Functions
  • Colors in Scripts
  • Custom Bash Prompts
  • LAB
  • Aliases
  • Bash Login Scripts
  • Create "userinfo" and "sysinfo" functions
  • 3. Working with Files
  • Communication Channels
  • File Redirection
  • Piping Commands Together
  • Doing Math, Filesystem Structures
  • Determining Disk Usage With df and du
  • cron, The crontab Command
  • crontab Format
  • /etc/cron.*/ Directories
  • Sending Email with mailx
  • LAB
  • Disk and Filesystem Usage
  • Redirection and Pipes
  • 4. Regular Expressions
  • Searching Inside Files
  • Regular Expression Overview
  • Regular Expressions
  • RE Character Classes
  • Regex Quantifiers
  • RE Parenthesis
  • The Streaming Editor
  • LAB
  • Pattern Matching with Regular Expressions
  • Extended Regular Expressions
  • Using Regular Expressions With sed
  • 5. Branching and Looping
  • Exit Status
  • Comparisons with test
  • Conditional Statements
  • Flow Control: case
  • Flow Control: while and until Loops
  • The borne for-Loop
  • Flow Control: select
  • LAB
  • Reporting User Statistics
  • Monitoring Filesystem Usage
  • 6. Data Munging
  • Text Processing with Awk
  • Text Sorting
  • Duplicate Removal Utility
  • Extracting Columns of Text
  • LABS
  • Create "rmhost" function
  • Create "showenv" function
  • Parsing Mail Server Logs
  • Fixing Incorrect Files
  • 7. Security, Whitespace, and Other Gotchas
  • Gotcha: Quoting Variables
  • Gotcha: Locales
  • Gotchas: Maximum Command Length
  • Gotcha: Whitespace in for Loops
  • Reading Files with while
  • Gotcha: $IFS
  • Gotcha: Printing in .bashrc
  • Gotcha: Aliases
  • LABS
  • Renaming MP3 Files
  • Split and Display $PATH
  • A tar-based Backup
  • A. CHALLENGE
  • Apache Configuration Files
  • httpd.conf – VirtualHost Configuration
  • LABS
  • Automated Virtual Host Provisioning
  • B. EMACS
  • Emacs
  • The Emacs Interface
  • Basic Emacs
  • More Emacs Commands
  • LABS
  • Text Editing with Emacs
  • C. THE SECURE SHELL (SSH)
  • OpenSSH Client & Server Configuration
  • Accessing Remote Shells
  • Transferring Files
  • SSH Key Management