Bash
Bash for Loops: Syntax, Arrays, Ranges, and Files
Learn Bash for loops with tested examples for ranges, arrays, filenames, and arguments. See when to use arithmetic loops, globbing, and line-aware reading.
Bash while and until Loops: Syntax, Examples, and Common Traps
Learn Bash while and until syntax, preserve file input and variables, and build bounded HTTP retries that distinguish success from errors and redirects.
Bash Functions: Arguments, Return Values, and Scope
Learn to define Bash functions, preserve arguments, capture output, and diagnose scope changes, masked failures, and set -e exceptions with runnable examples.
Bash Arrays: Indexed, Associative, and Safe Iteration
Choose indexed or associative Bash arrays, preserve filenames and command arguments, handle line input safely, and diagnose sparse indexes and shell scope.
Bash Tests and File Checks: Choose the Right Operator
Choose Bash tests for files, strings, and numbers. Compare brackets, check symbolic links, handle empty variables, and verify each condition's result.
Linux Environment Variables and PATH: Where to Set Them
Set Bash variables, export values, and edit PATH safely. Choose the right startup file or cron/systemd setting, then verify the process that needs it.
Bash Redirection, Pipes, and Exit Codes: Where Output Goes and How Failures Surface
Redirect stdout and stderr, compare 2>&1 order, and see how tee, pipefail, and PIPESTATUS affect what gets logged and which Bash command failed.
Bash Case Statement: Syntax, Pattern Matching, and Examples
Learn Bash case syntax, compare literal and glob patterns, see how ;;, ;& and ;;& work, and debug unexpected matches with runnable examples.
Bash if, elif, and else Statements
Learn how Bash chooses if, elif, and else branches, compare test forms, fix misleading conditions, and verify outcomes with safe inputs.