Tag: bash
All the articles with the tag "bash".
-
Git Hooks You Should Be Using Locally Right Now
Stop committing broken code. Git hooks catch mistakes before they hit CI, save hours of debugging, and make your team love you.
-
Bulk File Renaming on Linux: rename, vidir, fd
Master bulk file renaming on Linux with rename, vidir, fd, and mmv. The right tool for every scenario from regex rewrites to visual editing.
-
Disk Space Tools in 2026: Beyond du and df
du and df still work, but Rust-era tools like dust, duf, and fclones make disk triage faster and way less painful in 2026.
-
Compression in 2026: zstd Changed the Game
zstd is as fast as gzip with near-xz compression ratios. Here's why you should drop bzip2 forever and how to use zstd in 2026.
-
Named Pipes (FIFOs) in Shell Scripts
Named pipes (FIFOs) let you buffer and synchronize between processes. They're underused but solve real problems: queuing, coordination, and complex data flows.
-
Bash Arrays: The Feature That Makes Scripts Readable
Declare, iterate, and manipulate arrays safely. Use indexed and associative arrays for clean bash code.
-
Bash Process Substitution: What <() and >() Actually Do
Process substitution lets you treat a command's output as a file, and feed input to a command as if it were a file. It's weird but powerful.
-
Here Documents vs Here Strings in Bash
<<EOF syntax for multiline input, <<-EOF for indentation, <<<string for single lines. When to use each.
-
GNU parallel for Embarrassingly Parallel Tasks
GNU parallel runs tasks in parallel across CPU cores. It's faster than xargs and easier than writing a job queue. Here's when and how to use it.
-
trap in Bash: Clean Up When Your Script Dies
trap EXIT for cleanup, trap INT/TERM for graceful shutdown, trap ERR for errors. Reliable error handling.
-
Debugging Bash Scripts: set -x and Beyond
set -x prints every command before it runs. Add PS4 for context. Use trap for cleanup. Here's the toolkit every bash debugger needs.
-
Word Splitting: The Bash Gotcha That Corrupts Filenames
Unquoted variables split on IFS, breaking loops and file operations. Always quote vars. Here's why.