Posts
Linux Basics: Read Text with Bash read and mapfile
Preserve spaces, split a simple record, or load a short list into an array. Choose the input method that matches your text format. These examples were tested on Linux with GNU Bash …
October 19, 2026
Linux Basics: Parse Bash Options with getopts
Give small scripts clear flags without manually shifting every argument. Start with short options, then handle input errors and remaining filenames. These examples were tested on …
October 19, 2026
Linux Basics: Match Text with Bash case Patterns
A case statement makes a small text classifier readable. Patterns match strings directly; these examples do not search the filesystem. These examples were tested on Linux with GNU …
October 19, 2026
Linux Basics: Format Bash Output with printf
Predictable output helps both people and downstream tools. Keep the format string fixed, then pass values as quoted arguments. These examples were tested on Linux with GNU Bash …
October 19, 2026
Linux Basics: Clean Up Bash Temporary Files with Traps
Register cleanup just after creating temporary state. These examples remove only files they created, and use rmdir rather than recursive deletion. These examples were tested on …
October 19, 2026
SQLite Basics: Protect Rows with NOT NULL, CHECK, and UNIQUE
Constraints put basic validation next to the data. These isolated examples use INSERT OR IGNORE to demonstrate rejected rows without stopping the teaching runner. Real applications …
October 19, 2026
SQLite Basics: Keep Related Rows Consistent with Foreign Keys
A foreign key links a child row to a valid parent. Enable enforcement on every connection before starting a transaction. Each example explicitly enables it and uses disposable …
October 19, 2026
SQLite Basics: Insert or Update Rows with UPSERT
UPSERT handles a uniqueness conflict as part of an INSERT. It is useful for imports, counters, and versioned records. These examples require SQLite 3.24.0 or later and use explicit …
October 19, 2026
SQLite Basics: Handle Missing Values with NULL and COALESCE
Missing values need deliberate handling. These examples find absent data, choose a display fallback, and preserve the difference between an unknown amount and zero. Prepare a …
October 19, 2026
SQLite Basics: Break Queries into Steps with Common Table Expressions
An ordinary common table expression (CTE) gives a name to a query result for one statement. Use WITH to make filtering, aggregation, and small lookup sets easier to read. These …
October 19, 2026