Tag: shell scripting
All the articles with the tag "shell scripting".
-
Techniques for Writing Robust, Reliable Bash Scripts
Write bash scripts that don't silently fail — set -euo pipefail, error handling, input validation, and logging patterns for production scripts.
-
Preserving Bash History in Multiple Terminal Windows
By default bash history is lost across multiple terminal sessions. Fix it with HISTAPPEND and PROMPT_COMMAND so nothing gets overwritten.
-
Differences Between nohup, disown, and & in Linux
nohup, disown, and & all keep processes running after logout — but they work differently. Here's which one to reach for and why.
-
Understanding printf vs echo in Bash
echo is convenient but inconsistent across systems; printf is portable and precise — know when to use each and avoid the gotchas.
-
Linux Bash Tips and Tricks pt1
Bash tricks that save keystrokes — history expansion, brace expansion, process substitution, and the shortcuts your fingers will thank you for.
-
Bash for loops sequential counting
Master bash for loops, while loops, and seq for sequential counting — iterate over files, ranges, and arrays without losing your mind.