#

Bash

Subscribe
Archive

Bash

#Bash· October 29, 2026·8 min read

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· October 29, 2026·8 min read

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· October 29, 2026·9 min read

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· October 29, 2026·7 min read

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· October 29, 2026·7 min read

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.

#Bash· October 29, 2026·8 min read

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· October 29, 2026·7 min read

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· October 29, 2026·9 min read

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· October 29, 2026·8 min read

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.