Tag: scripting
All the articles with the tag "scripting".
-
curl Flags Every Developer Should Know
Master the curl flags that'll save you hours debugging APIs, downloads, and web requests. From -X to --compressed, here's what actually matters.
-
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.
-
String Manipulation in Bash (Without sed or awk)
Bash has built-in string operations: substring extraction, find-replace, case conversion, and trimming. You don't need sed for basic text work.
-
bash `set -e` Doesn't Work Like You Think
set -e silently fails in subshells, pipes, and conditionals. Learn the gotchas and fix them.
-
Bash Arithmetic Without bc
Bash has built-in arithmetic. You don't need bc for 90% of math. Here's how to do it right.