BASH (Shell Scripting)

Duration: 50 Hours

Course Content

Bash Shell Scripting participants gain a solid basic understanding of shell constructs and concepts. They learn to create their own shell scripts, understand existing scripts, and adapt these to new requirements.

Pre-Requisites

Good understanding of the main commands and user application in Linux and the Linux system administration.

Target Audience

This course is intended for software developers, administrators, and other users who want to acquire basic shell programming skills

Course Outline:

Unit- 1 Introduction

  • Shells
  • Types of Unix Shells
  • Advantages of Shell Scripts

Unit- 2 Bash Basics

  • Initialization Files
  • Login Shells, Non- Login Shells
  • Aliases, Variables
  • Working with Variables
  • Important Internal Bash Variables
  • Command History
  • Input and Output Channels
  • Redirection to Files
  • The here Operator
  • Feeding Output to Another Process
  • Duplicating the Output with tee
  • Types of Commands
  • Quoting
  • Substitution and Expansion
  • Variable Substitution
  • Filename Expansion(File Globbing)
  • Command & Arithmetic Substitution
  • Command- Line Interpretation
  • Command Separators

Unit- 3 Basic Script Elements 1(Input, Output)

  • Program Flow Charts
  • General Considerations
  • Producing Output From a Script
  • Reading User Input
  • Simple Operation with Variables
  • Basic Strings Operation
  • Arithmetic Operations
  • Regular Expressions

Unit- 4 Basic Script Elements 2(Control Structures)

  • Simple Branching With if
  • Short Form of if
  • Multiple Branch with case
  • Iterations and Loops
  • Looping with while and until
  • Processing a List with for
  • Exiting From a Loops
  • Exiting from the Current Loop
  • Iteration with continue
  • Exiting from the Loop with break

Unit- 5 Advanced Scripting Techniques

  • Reading input with read
  • Shell Functions
  • Reading Options with getopts
  • Signal Handling with trap
  • Implementing Simple Menus with select
  • Dialog Boxes with dialog
  • Yes/No Box(yesno)
  • Message Box(msgbox)
  • Input Box(input box)
  • Text Box(text box)
  • Menu Box(menu)
  • Check List Box(checklist)
  • Radio List Box(radio list)
  • progress Meter Box(gauge)

Unit- 6 Useful utilities for Shell Scripts

  • cat
  • cut
  • date
  • grep
  • egrep
  • fgrep
  • sed
  • test
  • tr
  • awk
  • Sort
  • uniq
  • Special Variable Substitution Operators for Bash
  • Debugging Shell ScriptsSample ScriptsBottom of Form