Linux Shell Scripting Training

About the Training

The Linux Shell Scripting Training is a hands-on program designed to equip participants with the skills to manage and automate a Linux system using shell scripts. This ability is essential for roles such as system administrators, data scientists, software developers, and other technology-focused positions. Linux shell scripting is commonly used in scenarios such as system automation, task automation, rapid prototyping, and data processing.

This training program teaches the fundamental principles of the Linux system shell, the basics of shell scripting language, and how to effectively use it. Participants will learn how to create shell scripts, use shell variables and arguments, control flow, loops, processes, shell debugging, and how to build programming structures for shell scripts.

The training also covers how to use shell tools and applications in various real-world scenarios such as system administration, data management, network management, and security. Additionally, participants will learn how to integrate and collaborate the Linux shell scripting language with other programming languages.

The skill of Linux shell scripting is applicable across various Linux distributions and Unix-based systems. Therefore, this training enables participants to develop the capability to use shell scripts on a wide range of systems. By the end of the training, participants will have a solid understanding and skill set to automate complex tasks using Linux shell scripting and perform various system and application management operations. These skills offer a significant advantage in any technology-focused position, helping participants to be more productive and effective in their work.

What Will You Learn?

In the Linux Shell Scripting Training, you will learn the following:
  • Basic concepts of shell programming languages
  • Commands and file structure used in shell scripts
  • Techniques for managing and processing data
  • Using functions and loops
  • Accessing system data
  • Automating processes
  • Debugging and reading error messages
  • Techniques for testing and debugging shell scripts
This training is suitable for anyone who wants to learn how to write shell scripts in Linux and Unix-like operating systems, and it will be beneficial for participants who want to improve their shell programming skills.

Prerequisites

The prerequisites for the Linux Shell Scripting Training are as follows:
  • Basic knowledge of Linux or Unix-like operating systems: The training is conducted in a Linux or Unix-like environment, so having basic knowledge of these systems is important.
  • Access to the command line: Command line access is required to write shell scripts during the training.
  • Basic knowledge of the file system and file structure: The training requires a fundamental understanding of the file system and file structure.
  • Basic knowledge of programming languages: The training requires a basic understanding of programming languages and familiarity with key programming concepts.

Who Should Attend?

The Linux Shell Scripting Training is suitable for:
  • Users who are working with Linux or Unix-like operating systems
  • Users who have access to the command line and want to write shell scripts
  • Users with basic knowledge of the file system and file structure
  • Users with a basic understanding of programming languages
  • System administrators or network operators who want to automate tasks
  • Users who want to gain more knowledge and skills in Linux shell scripting
This training can be beneficial for anyone who wants to improve their shell programming skills and uses a Linux or Unix-like operating system.

Outline

Introduction
  • Objectives
  • Course Schedule
  • Course Introductions
  • Pre-requisites
  • Bibliography
  • Delegate Responsibilities
  • Course Summary
Review of Basics – optional
  • Files
  • Directories and Processes
  • Displaying Directories – ls
  • Getting Help – man
  • Displaying Files – cat, more
  • Simple Commands
  • Piping – using | symbol
  • Redirection – using > symbol
  • Redirection – using >> symbol
  • Redirecting Input – using < symbol
  • Redirecting Errors
  • Using /dev/null
  • Foreground Jobs
  • Background Jobs – &
  • Stopping Jobs – kill
  • Special Files – . and ..
  • The Command Prompt – PS1
  • Creating Aliases
  • Using Aliases
  • Command history
  • Command Line Edit – using Arrow Keys
  • Command Line Edit – using vi
  • Customising the Shell
  • The Home Directory – HOME
  • The Working Directory – pwd
  • Changing Directories – cd
  • Make Directory – mkdir
  • Remove Directory – rmdir
  • Interactive Copy – cp -i
  • Interactive Move – mv -i
  • Interactive Remove – rm -i
  • Removing Directories – rm -r
  • Wild Cards – File Name Generation
  • Word count – wc
  • Finding Files – find
  • Finding Text in Files – grep, sort, cut, uniq, tr
  • Changing Permissions – chmod
Shell Programming
  • Creating Shell Scripts
  • Testing the Command
  • Creating the Script File
  • Adding Execute Permissions
  • Testing the Script
  • Running the Script – time
  • Running the Script – dot
  • Running the Script – exec
  • Running the Script – ksh
  • Debugging the Script
  • Passing Parameters
  • The read Command
  • Using read in Scripts
  • Choosing the Shell
  • Tidying The Output
  • Suppressing Input – stty
Special Characters and Variables
  • Quotation Marks
  • Quoted Strings – “, ‘
  • Escape Character – *
  • Quoted Strings – `
  • Using $(…)
  • System Variables – set
  • Other Special Variables
  • User Variables
  • User Variables – unset
  • Variables in Scripts
  • Typeset Command
  • Integer Variables
  • Special Constructs
Creating Menus
  • Conditions – case
  • Creating a Menu
  • Iteration – while, until
  • Holding the Output – sleep
  • Holding the Output – dummy read
  • Ending the Script
  • Ending the Loop
  • Hidden Option – forking a shell
  • Trapping Interrupts – trap
  • More on Interrupts
  • Highlighting Text- tput
  • Positioning the Cursor – backtab \b
  • Korn Shell Menu
Selection
  • Conditional Testing
  • Testing File Attributes
  • Testing File Permissions
  • Multiple Tests – Nested ifs
  • Multiple Tests – elseif
  • The NOT Condition
  • Multiple Conditions in One Test
  • Testing Strings
  • Using Square Brackets
  • Avoiding Null Input
  • Testing Numbers
  • More on case
  • Displaying Variables
  • Placing Spaces
  • Testing Commands
Iteration, Looping
  • Computations – let
  • Iteration – while, until
  • Infinite Loop
  • Iteration – for
  • More than 9 Parameters – shift
Sub-scripts and Functions
  • Local and Global Variables
  • Sub-scripts
  • Export Command
  • Exit Status
  • Aliases
  • Functions
  • Useful Functions
  • Return Status
  • Manipulating Functions
  • Functions in Scripts
Advanced Commands
  • Debugging – set
  • Setting – set
  • Merging Files – join
  • Merging Files – paste, basename and dirname
  • Job Control – jobs
  • Regular Expressions
  • Global Regular Expression Printer – grep
  • Expression grep – egrep
  • Fast grep – fgrep
  • Computations – expr
  • Computations – bc, eval Command,
  • Argument Processing
  • getopts Command
  • Using Arrays
Advanced Edit – vi & sed
  • vi – Mapping Key Combinations
  • Mapping Control Keys
  • Using Abbreviations
  • Editing Many Files
  • Regular Expressions
  • Global Insert
  • Here document,
  • Batch Stream Editor – sed, sed delete, -d, sed print, -p, sed suppress, -n, sed quit, -q, sed file, -f, sed Multiple Input, sed
  • Find and Replace
  • sed Example
Text File Processing – awk
  • The awk Programming Tool
  • Pattern Matching
  • Regular Expressions
  • Comparison Patterns
  • Compound Patterns
  • Range Patterns
  • Special Patterns
  • Built-in Functions
  • Troubleshooting awk Scripts
  • Passing Parameters
  • Using Contains
  • printf Function
  • Computations
  • Functions
  • substr
  • length
  • Action Statements
  • Control Flow Statements
  • Arrays
  • Arrays with for Loops
  • awk Examples

Training Request Form