Code Blogs
These are the code blogs: short posts built around one real script — bash or Python — that I wrote, tested and ran until it worked. Every command, exit code and line of output on these pages comes from an actual run; nothing was typed in after the fact.
How a post gets verified
Before anything is published, the script and its test harness are dropped into an isolated container: no network access, a read-only root filesystem, and only a small temporary workspace. The harness has to pass — wrong counts, missing files, broken edge cases all fail the run — and every attempt is recorded until it goes green. The article is then written from those real transcripts only, so the output you see on each page is what the machine actually printed.
November 2026
- Nov 29 — Walk a Directory Tree Without Hanging on Circular Symlinks
- Nov 29 — Parsing Log Files That Contain Malformed and Truncated Lines
- Nov 29 — Extract Log Lines Between Two Timestamps with a Bash Script
- Nov 29 — Convert a JSON Array of Objects to CSV with Column Selection
- Nov 29 — Batch-Rename Files by Extension Across a Directory Tree
- Nov 24 — Taking the First N Lines Without Killing Your Pipeline
- Nov 24 — Split a Timestamped Log File Into One Output File Per Date
- Nov 24 — Split a Large File into Fixed-Size Chunks (and Prove They Rejoin)
- Nov 24 — Replace Text Across a Directory Tree Without Losing Your Mind
- Nov 24 — Parse an SSH auth.log: Top Source IPs and Usernames in One Pass
- Nov 24 — Merging CSV Files by Header Without Losing Your Mind
- Nov 24 — Listing Every Zero-Byte File in a Directory Tree
- Nov 24 — List Every File Modified in the Last N Hours, Newest First
- Nov 24 — Count Lines Across Many Files Without Losing Your Mind
- Nov 24 — A Python Log Follower That Survives Rotation
- Nov 23 — Parse SSH Auth Logs: Top Source IPs and Failed Usernames
- Nov 23 — Counting Words in a File Without Importing a Library You Don't Need
- Nov 23 — Converting an Epoch Timestamp to a Readable Date in Bash
- Nov 22 — Counting Unique Python Exceptions in Log Files Without a GUI
- Nov 22 — Converting a CSV to JSON with Column Selection and Type Inference
- Nov 22 — Check Whether a TCP Port Is Open on a Remote Host, in Pure Bash
- Nov 22 — Check TLS Certificate Expiry Across Your Domains in One Script
- Nov 21 — Safely Remove Files Older Than N Days (With a Dry-Run You Can Actually Trust)
- Nov 21 — Parse an Nginx Access Log for Top IPs, Paths, and Status Codes
- Nov 21 — List Every File Older Than N Days in a Directory Tree
- Nov 21 — Find the Largest Files on Linux with a 25-Line Bash Script
- Nov 21 — Count Log Levels Without a Server