Bash is a powerful command-line interpreter that enables users to execute commands in a text-based terminal. It can also run sequences of commands from a file, known as a shell script, making it a versatile tool for automation and system management.
In this course, you'll explore the fundamentals of Bash and shell scripting. You'll learn how to define variables, create functions, and control the flow of execution using conditionals. The course will guide you through writing and executing scripts that interact with the shell, helping you streamline tasks and enhance productivity in a Linux or Unix environment.
Who should take this Course?
The Bash Shell Scripting Online Course is ideal for system administrators, DevOps engineers, developers, and IT professionals who want to automate tasks, manage systems efficiently, and enhance productivity using Bash scripts. It’s also suitable for Linux users and students aiming to deepen their command-line and scripting skills. Basic knowledge of Linux commands and file systems is recommended for a smooth learning experience.
Course Outline
The Bash Shell Scripting Online Course covers important topics including -
Unit 1 - Ground – Zero (3)
Course Overview
Getting the Best Out of this Course
Repetitions
Unit 2 - Getting Started – The Basics (10)
Overview
Editors - vi, nano, vim, GUI Editors, Etc.
My First Script
Accepting an Input from the User
Passing Arguments
Functions - The Basics
"printf" Statement - Part 1
"printf" Statement - Part 2
Escape Character & Line Continuation Character
Getting Started - Assignment #1
Unit 3 - Understanding Variables (12)
Overview
Variables - Basic Concepts
Using Variables - Basics
Global variables, and Variable Scope
Environment Variables
Positional Parameters
Other Shell Variables - Part 1
Other Shell Variables - Part 2
Variables in Functions (Local Variables)
Declare Statement
Source and Export Commands
Command Substitution
Unit 4 - Operators (10)
Overview
Types of Operators
Conditional Tests
Performing Arithmetic Operations
Arithmetic Operators – Part 1
Arithmetic Operators – Part 2
Arithmetic Comparison Operators
String Comparison Operators
Logical Operators
File Test Operators
Unit 5 - Customizing Shell Environment (4)
Bash Shell Special Files
Alias Command
Practical Usage of the Profile File
Shell Prompt Customization
Unit 6 - Shell Parameter Expansion (2)
Brace Expansion
Shell Parameter Expansion
Unit 7 - Flow Control (6)
Conditional Statement - if..then..else
Creating Loops Using "while" and "until"
Creating Loops Using "for"
Controlling the Flow - sleep, continue, break & exit
"case" Statement
Creating User Menus - "select" Statement
Unit 8 - File Processing (4)
Reading Files Using "while"
Reading Files Using "for"
Assignment - passwd
Assignment - passwd - Solution
Unit 9 - Functions - Revisited (4)
Simple Function
Returning Data
Passing Arguments to Functions
Using Functions from External Scripts
Unit 10 - Parsing Command Line Arguments (2)
Using the "shift" Function
Parsing Arguments Using "getopts "
Unit 11 - Process Handling and Running Scripts (8)
Process, Parent Process, Child Process, & Process ID (PID)