Bash Shell Scripting Online Course
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.
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)
- Types of Processes - FG, BG, and D
- Viewing the Running Processes (ps Command)
- "nohup" Command
- "time" Command
- Signals
- Killing Processes - "kill" Command
- Job Control - jobs, fg, and bg
Unit 12 - Scheduling Scripts (3)
- Scheduling Concepts
- "at" Command & "batch" Command
- "cron" Command
Unit 13 - Debugging Scripts (3)
- Debugging - Part 1
- Debugging - Part 2
- Debugging - Part 3
Unit 14 - Scripting @ The Command-line (5)
- Overview
- Using "semicolon" and "pipe"
- Using && and ||
- Killing Processes using "awk" and "xargs"
- Loops at the Command-line
Unit 15 - Linux Commands – Quick Refresher (4)
- "tar" Command - Part 1
- "tar" Command - Part 2
- Basic System - Commands
- Shutdown and Reboot
Unit 16 - Standard I/O Concepts (5)
- Standard I/O Concepts
- Standard I/O Demo
- Terminal and Null Files
- File Descriptors Usage
- Using "I" (pipe) - sort & uniq Commands