Standard Search
About 38 results
https://rednafi.com/misc/to-quote-or-not-to-quote/ · 5 Oct 2022
Master shell quoting rules: single vs double quotes, backticks vs $(). Learn when to quote variables to prevent spaces and special characters from breaking commands.
https://rednafi.com/misc/return-values-from-a-shell-function/ · 25 Sep 2022
Understand how return values work in Bash functions. Learn exit codes, status evaluation patterns, and proper boolean returns with true/false commands.
https://rednafi.com/misc/distil-git-logs-attached-to-a-file/ · 21 Jun 2022
View git commit history for a single file with git log --follow. Learn to track multiple files with xargs and concatenate their commit logs.
https://rednafi.com/misc/health-check-a-server-with-nohup/ · 18 Apr 2022
Run background health checks in CI with nohup and ampersand. Test server readiness with retry loops and automatic cleanup on success or failure.
https://rednafi.com/misc/do-not-add-extensions-to-bash-executables/ · 23 Nov 2021
Why executable scripts shouldn't have extensions. Learn GitHub's scripts-to-rule-them-all pattern for language-agnostic project automation.
https://rednafi.com/misc/use-command-v-over-which/ · 16 Nov 2021
Replace which with command -v for POSIX-compliant executable lookup. Learn why command -v is the portable alternative for finding program paths.
https://rednafi.com/misc/use-curly-braces-while-pasting-shell-commands/ · 8 Nov 2021
Prevent shell commands from executing immediately when pasting. Use curly braces to safely paste multi-line commands with hidden newline characters.
https://rednafi.com/misc/use-strict-mode-while-running-bash-scripts/ · 8 Nov 2021
Enable Bash strict mode with set -euo pipefail to catch errors early. Exit on failures, treat unset variables as errors, and handle pipeline failures properly.