Linux Shell Scripting — Full Syllabus
This syllabus covers fundamental to advanced concepts of Linux shell scripting using Bash.
Each week/module is organized with main topics and subtopics for structured learning.
✅ Module 1: Introduction to Linux & Shell
- Overview of Linux and the command line
- What is a shell? Types of shells (Bash, Zsh, etc.)
- Interactive vs non-interactive shell
- Shebang (
#!/bin/bash) and script execution - Permissions and
chmod
✅ Module 2: Basic Shell Scripting
- Creating and running scripts
- Shell variables and environment variables
- Quoting: single, double, backticks
- Command substitution
- Input/output redirection and pipelines
✅ Module 3: Conditional Statements
if / else / elifconstructs- File tests (
-f,-d,-r,-w) - String and numeric comparisons
- Exit status and
$?
✅ Module 4: Loops & Functions
for,while, anduntilloops- Loop control:
breakandcontinue - Arrays in Bash
- Defining and calling functions
- Scope of variables inside functions
✅ Module 5: Script Arguments & Error Handling
- Positional parameters (
$1,$#,$@) - Using
getoptsfor options - Exit codes and
set -e - Error handling and logging
- Trapping signals with
trap
✅ Module 6: File & Directory Management
- Working with files and directories
find,xargs,stat- Creating safe temporary files with
mktemp - Archiving and compressing files
- Backup scripting basics
✅ Module 7: Text Processing
- Using
grepfor searching cut,sort,uniq,paste- Editing text with
sed - Parsing data with
awk - Regular expressions (basic & extended)
✅ Module 8: Process & Job Control
- Foreground and background jobs
- Process management (
ps,top,kill) - Signals and process priorities (
nice) - Automation with
nohupanddisown - Introduction to systemd services (optional)
✅ Module 9: Scheduling & Automation
- Using
cronjobs - Crontab syntax and environment issues
atcommand for one-time scheduling- Automated log rotation
- Systemd timers (advanced)
✅ Module 10: Advanced Scripting Practices
- Input validation and sanitization
- Debugging with
set -x - Modular scripting (reusable libraries)
- Writing usage/help messages
- Best practices for clean scripts
✅ Module 11: Security & Testing
- Preventing command injection
- Safe handling of user input
- Principle of least privilege
- Automated testing with
bats - Documentation and version control with Git
✅ Module 12: Final Project
- Backup & restore automation script
- Log monitoring & alerting tool
- Deployment helper script
- System health check & report generator
- Presentation and demonstration
