Skip to content

Tag: bash

All the articles with the tag "bash".

trap in Bash: Clean Up When Your Script Dies

trap in Bash: Clean Up When Your Script Dies

· Updated:

Use trap EXIT to clean up temp files, INT/TERM for graceful shutdown, and ERR for errors. Stop your bash scripts from leaving messes when they die.

bash `set -e` Doesn't Work Like You Think

bash `set -e` Doesn't Work Like You Think

· Updated:

set -e looks bulletproof, but it slips right through pipes, command substitution, and conditionals. The bash gotchas that bite at 2 AM, and how to fix them.

jq One-Liners Every Sysadmin Needs

jq One-Liners Every Sysadmin Needs

· Updated:

jq is JSON on the command line. Here are 5 one-liners that actually solve real problems: filtering, extracting, transforming, combining, and debugging.