|
Session
|
Module Focus
|
Topics Covered
|
|
1
|
Level 1 Recap & Advanced Intro
|
Quick review of Level 1 (loops, if/else, permissions). Introduction to the Bash environment, startup files (.bashrc, .bash_profile), and script execution environments.
|
|
2
|
Mastering Regular Expressions
|
Basic vs. Extended Regular Expressions (BRE vs. ERE). Pattern matching, anchors, character classes, and capturing groups for text extraction.
|
|
3
|
Text Processing with sed
|
Using the Stream Editor. In-place editing, advanced substitution, addressing specific lines, and multi-command execution.
|
|
4
|
Data Extraction with awk
|
The awk programming model. Field separators, built-in variables (NR, NF), writing awk scripts for log parsing and report generation.
|
|
5
|
Advanced I/O & Redirection
|
File descriptors (0, 1, 2 and custom ones). Here Documents (<()).
|
|
6
|
Process & Job Management
|
Foreground/background jobs (&, fg, bg). Using wait for parallel processing. Managing detached processes with nohup and disown.
|
|
7
|
Signal Handling with trap
|
Understanding Linux signals (SIGINT, SIGTERM). Using the trap command to clean up temporary files and handle graceful script exits.
|
|
8
|
Robust Error Handling
|
Writing bulletproof scripts using set -e, set -u, set -x, and set -o pipefail. Creating custom error-handling and logging functions.
|
|
9
|
Subshells & Variable Scope
|
How subshells work and their performance impact. Exporting variables, scoping with local, and understanding environment inheritance.
|
|
10
|
Networking & APIs in Bash
|
Making HTTP requests with curl. Parsing JSON responses in Bash using jq. Interacting with REST APIs for system automation.
|
|
11
|
Interactive & GUI Scripts
|
Creating user-friendly menus using the select command. Building terminal-based graphical dialogs using whiptail or dialog.
|
|
12
|
Security & Best Practices
|
Safe handling of temporary files (mktemp). Avoiding eval. Quoting pitfalls. Using ShellCheck to lint and secure scripts.
|
|
13
|
Professional CLI Interfaces with getopts
|
Moving beyond $1, $2. Using getopts to parse standard UNIX flags (e.g., -h, -v, -f filename). Handling required and optional arguments elegantly.
|
|
14
|
Advanced Bulk File Operations (find & xargs)
|
Mastering find predicates (time, size, permissions). Safe execution on files with spaces using -print0 and xargs -0. Batch processing techniques.
|
|
15
|
Remote Automation & SSH
|
Executing scripts and commands on remote servers via ssh. Automating file transfers with scp and rsync. Managing SSH keys for passwordless script execution.
|