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.
All the articles with the tag "scripting".
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) let you buffer and synchronize between processes. They're underused but solve real problems: queuing, coordination, and complex data flows.
Declare, iterate, and manipulate arrays safely. Use indexed and associative arrays for clean bash code.
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.
<<EOF syntax for multiline input, <<-EOF for indentation, <<<string for single lines. When to use each.
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 EXIT for cleanup, trap INT/TERM for graceful shutdown, trap ERR for errors. Reliable error handling.
set -x prints every command before it runs. Add PS4 for context. Use trap for cleanup. Here's the toolkit every bash debugger needs.
Unquoted variables split on IFS, breaking loops and file operations. Always quote vars. Here's why.
Bash has built-in string operations: substring extraction, find-replace, case conversion, and trimming. You don't need sed for basic text work.
set -e silently fails in subshells, pipes, and conditionals. Learn the gotchas and fix them.
Bash has built-in arithmetic. You don't need bc for 90% of math. Here's how to do it right.