Bash Roadmap

Open a topic for notes and resources. Mark it done when you are ready to move on.

31 stages · 122 topics 0% done
Bash
✓ Basic Parameter Expansion Forms
✓ String Manipulation Expansion
✓ Foundations
✓ Indirect Expansion & Name References
✓ Arrays & Array Expansion
✓ Core Concepts
✓ Pattern Matching & Wildcard Expansion
✓ Arithmetic & Base Conversion
✓ Here Documents & Here Strings
✓ Subshell Execution (())
✓ Intermediate Skills
✓ Process Substitution (<(cmd), >(cmd))
✓ Command Substitution ($(), backtick)
✓ Advanced Topics
✓ Subshell Variable Scope
✓ Nested Subshells
✓ Process Substitution vs Pipes
✓ Coprocesses (coproc)
✓ Expert Level
✓ Indexed Arrays (declare -a)
✓ Associative Arrays (declare -A, Bash 4+)
✓ Mastery
✓ Array Operations (slice, concat, transform)
✓ Looping Over Arrays
✓ Array Sorting & Deduplication
✓ Array from Command Output (mapfile)
✓ Ecosystem
✓ Multi-Dimensional Arrays (simulated)
✓ Bash Regex with =~
✓ Architecture
✓ Bracket Expressions & POSIX Character Classes
✓ Extended Globbing (extglob)
✓ Sed with Extended Regex
✓ Awk Pattern Matching
✓ Optimization
✓ Grep and Perl-Compatible Regex
✓ Regex Performance in Bash
✓ Deployment
✓ File Descriptor Manipulation
✓ Redirection Operators (<, >, >>, 2>&1)
✓ Named Pipes (FIFO)
✓ IO Redirection Order
✓ Phase 11
✓ Socket Redirection (/dev/tcp)
✓ Buffer & Race Conditions in I/O
✓ Phase 12
✓ Redirection with exec
✓ Function Definition & Return
✓ Local Variables (local) & Scoping
✓ Function Arguments ($@, $*, shift)
✓ Phase 13
✓ Recursive Functions
✓ Function Export (export -f)
✓ Phase 14
✓ Trap in Functions
✓ Autoloading Functions
✓ Signal Handling (trap)
✓ Common Signals (SIGINT, SIGTERM, SIGHUP)
✓ Phase 15
✓ Cleanup Handler Pattern (trap EXIT)
✓ Signal Masking & Propagation
✓ Phase 16
✓ Process Group Signaling (kill -- -PGID)
✓ Timeouts with trap ALRM
✓ Debugging with trap DEBUG
✓ set -e, -u, -o pipefail
✓ Phase 17
✓ Bash Execution Tracing (set -x, PS4)
✓ ShellCheck Static Analysis
✓ Phase 18
✓ Bash -n Syntax Checking
✓ errexit Pitfalls
✓ Debug Hooks (PS4, DEBUG trap)
✓ Bash Debugger (bashdb)
✓ Phase 19
✓ Process Startup Overhead (exec vs builtin)
✓ Avoid Useless forking
✓ Phase 20
✓ Brace Expansion Speed
✓ printf vs echo
✓ Built-in vs External Commands
✓ Reading Files Efficiently (read -N, mapfile)
✓ Phase 21
✓ Parallel Execution Overhead
✓ Injection Attacks (eval, $() in strings)
✓ Phase 22
✓ Sanitizing Input
✓ PATH & Environment Attacks
✓ File Permission Checks
✓ Temporary File Safety (mktemp)
✓ Phase 23
✓ setuid Script Risks
✓ Shellshock (CVE-2014-6271)
✓ Phase 24
✓ /dev/tcp & /dev/udp
✓ Netcat (nc) Patterns
✓ curl REST API Scripting
✓ HTTP Server in Bash (socat)
✓ Phase 25
✓ DNS Queries (host, dig)
✓ SSH Automation (ssh, scp, rsync)
✓ Phase 26
✓ Network Diagnostics (ping, traceroute, mtr)
✓ Grep Patterns & Performance
✓ Sed Commands & Addresses
✓ Awk Scripting (Records, Fields, Arrays)
✓ Phase 27
✓ Cut, Paste, Join, Sort, Uniq
✓ Pipe & Process Chains
✓ Phase 28
✓ Xargs Tricks (Parallel, Delimiter)
✓ Large File Streaming
✓ Background Processes (&)
✓ Wait for Job Completion
✓ Phase 29
✓ GNU Parallel Tool
✓ xargs -P (parallel)
✓ Phase 30
✓ Job Control (fg, bg, jobs, disown)
✓ Semaphore Pattern with flock
✓ Parallel Download Scripts
✓ Phase 31
Text version of this roadmap

1. Foundations

  • Basic Parameter Expansion Forms: Parameter expansion in Bash manipulates variable values without external commands. ${var:-default} provides defaults, ${var#prefix} removes prefixes, ${var%suffix} removes suffixes, ${var/old/new} replaces substrings. These operations are built into the shell for efficiency.
  • String Manipulation Expansion
  • Indirect Expansion & Name References

2. Core Concepts

  • Arrays & Array Expansion
  • Pattern Matching & Wildcard Expansion
  • Arithmetic & Base Conversion

3. Intermediate Skills

  • Here Documents & Here Strings
  • Subshell Execution (())
  • Process Substitution (<(cmd), >(cmd))

4. Advanced Topics

  • Command Substitution ($(), backtick)
  • Subshell Variable Scope
  • Nested Subshells

5. Expert Level

  • Process Substitution vs Pipes
  • Coprocesses (coproc)
  • Indexed Arrays (declare -a)

6. Mastery

  • Associative Arrays (declare -A, Bash 4+)
  • Array Operations (slice, concat, transform)
  • Looping Over Arrays

7. Ecosystem

  • Array Sorting & Deduplication
  • Array from Command Output (mapfile)
  • Multi-Dimensional Arrays (simulated)

8. Architecture

  • Bash Regex with =~
  • Bracket Expressions & POSIX Character Classes
  • Extended Globbing (extglob)

9. Optimization

  • Sed with Extended Regex
  • Awk Pattern Matching
  • Grep and Perl-Compatible Regex

10. Deployment

  • Regex Performance in Bash: Performance considerations for regex performance in bash in Bash significantly impact application behavior. Understanding optimization strategies helps avoid common pitfalls and improve runtime characteristics.
  • File Descriptor Manipulation
  • Redirection Operators (<, >, >>, 2>&1)

11. Phase 11

  • Named Pipes (FIFO)
  • IO Redirection Order
  • Socket Redirection (/dev/tcp)

12. Phase 12

  • Buffer & Race Conditions in I/O
  • Redirection with exec
  • Function Definition & Return

13. Phase 13

  • Local Variables (local) & Scoping
  • Function Arguments ($@, $*, shift)
  • Recursive Functions

14. Phase 14

  • Function Export (export -f)
  • Trap in Functions
  • Autoloading Functions

15. Phase 15

  • Signal Handling (trap)
  • Common Signals (SIGINT, SIGTERM, SIGHUP)
  • Cleanup Handler Pattern (trap EXIT)

16. Phase 16

  • Signal Masking & Propagation
  • Process Group Signaling (kill -- -PGID)
  • Timeouts with trap ALRM

17. Phase 17

  • Debugging with trap DEBUG
  • set -e, -u, -o pipefail
  • Bash Execution Tracing (set -x, PS4)

18. Phase 18

  • ShellCheck Static Analysis
  • Bash -n Syntax Checking
  • errexit Pitfalls

19. Phase 19

  • Debug Hooks (PS4, DEBUG trap)
  • Bash Debugger (bashdb)
  • Process Startup Overhead (exec vs builtin)

20. Phase 20

  • Avoid Useless forking
  • Brace Expansion Speed
  • printf vs echo

21. Phase 21

  • Built-in vs External Commands
  • Reading Files Efficiently (read -N, mapfile)
  • Parallel Execution Overhead

22. Phase 22

  • Injection Attacks (eval, $() in strings)
  • Sanitizing Input
  • PATH & Environment Attacks

23. Phase 23

  • File Permission Checks
  • Temporary File Safety (mktemp)
  • setuid Script Risks

24. Phase 24

  • Shellshock (CVE-2014-6271)
  • /dev/tcp & /dev/udp
  • Netcat (nc) Patterns: Various network scripting patterns emerge when working with netcat (nc) patterns in Bash. These patterns provide reusable solutions to common programming challenges.

25. Phase 25

  • curl REST API Scripting
  • HTTP Server in Bash (socat)
  • DNS Queries (host, dig)

26. Phase 26

  • SSH Automation (ssh, scp, rsync)
  • Network Diagnostics (ping, traceroute, mtr)
  • Grep Patterns & Performance: Performance considerations for grep patterns & performance in Bash significantly impact application behavior. Understanding optimization strategies helps avoid common pitfalls and improve runtime characteristics.

27. Phase 27

  • Sed Commands & Addresses
  • Awk Scripting (Records, Fields, Arrays)
  • Cut, Paste, Join, Sort, Uniq

28. Phase 28

  • Pipe & Process Chains
  • Xargs Tricks (Parallel, Delimiter)
  • Large File Streaming

29. Phase 29

  • Background Processes (&)
  • Wait for Job Completion
  • GNU Parallel Tool

30. Phase 30

  • xargs -P (parallel)
  • Job Control (fg, bg, jobs, disown)
  • Semaphore Pattern with flock

31. Phase 31

  • Parallel Download Scripts