Posts
Linux Basics: Generate Controlled Numeric Sequences with GNU seq
A shell loop or small fixture may need a predictable sequence of numbers. GNU seq handles explicit start, step, and end values and can format each number. Keep the sequence small …
October 27, 2026
Linux Basics: Format Output Explicitly with GNU printf
Predictable shell output needs a fixed format string and data passed as separate arguments. This example invokes the external GNU printf through env, making the implementation …
October 27, 2026
Linux Basics: Check Portable Path Names with GNU pathchk
An export format may need conservative filenames even when the current filesystem accepts more characters. GNU pathchk checks path validity and optional portability constraints. It …
October 27, 2026
JavaScript Basics: Match Path Strings with path.matchesGlob
A tool may need to filter an existing list of paths without walking the filesystem. Node’s path.matchesGlob tests one path string against a glob. Use the POSIX variant explicitly …
October 27, 2026
JavaScript Basics: Load CommonJS from an ES Module with createRequire
An ES module may need to integrate with an existing CommonJS helper. createRequire constructs a require function anchored to a filename or file URL. This fixture creates a local …
October 27, 2026
JavaScript Basics: Inspect Shared File Identity with Hard Links
Two filesystem names can refer to the same underlying file. Node’s link creates a hard link, and stat can confirm the shared identity. An isolated fixture shows that writing …
October 27, 2026
JavaScript Basics: Compare Nested Values with isDeepStrictEqual
Two objects can hold equivalent values without being the same object. Node’s isDeepStrictEqual provides a Boolean comparison using deep strict rules. A small set of cases shows why …
October 27, 2026
JavaScript Basics: Classify Built-In Values with util.types
Values from another JavaScript realm can fail ordinary instanceof checks. Node’s util.types offers built-in type predicates for diagnostic and interoperability code. A trusted …
October 27, 2026
Git Basics: Validate Revisions and Inspect Repository Context
Shell scripts should validate a requested revision before using it in later Git commands. git rev-parse can require a commit object and report the current checkout context. The …
October 27, 2026
Git Basics: Inspect Stored Objects with cat-file
A checkout shows one view of a repository. git cat-file lets a diagnostic script inspect stored objects directly: their types, sizes, and contents. A small committed file makes the …
October 27, 2026