Tag: Shell Script
Tag: Shell Script
Section titled “Tag: Shell Script”7 posts
Use related categories to jump back to broader domain-level navigation.
Related categories
- Safely process filenames containing spaces and newlines with find and xargs Learn how to safely process large numbers of filenames containing spaces or newlines using find -print0, xargs -0, -exec, batching, and parallel execution.
- Safely Transform Configuration Files with sed Explains how to safely transform configuration files with sed using addresses, captures, backups, idempotent replacement, and diff checks to prevent unintended changes on repeated runs.
- Bash File Descriptors and I/O Redirection Learn Bash file descriptors, separating stdout and stderr, grouping commands, and the difference from tee through practical examples, and safely route logs and error output to the intended destinations.
- Use Bash Parameter Expansion for Defaults, Validation, and String Processing Explains how to use Bash parameter expansion to set defaults, validate unset values, remove prefixes and suffixes, and replace strings so input can be processed safely with fewer external commands.
- Detecting Bash Script Failures with strict mode and trap Learn how to reliably detect Bash script failures with errexit, nounset, pipefail, and ERR/EXIT traps, including safe execution with exception handling and cleanup.
- Practical Patterns for Bash Arrays and Associative Arrays This article explains practical patterns for Bash arrays and associative arrays, including adding elements, managing keys, iterating safely, and handling arguments, so that multiple values can be processed safely without concatenating them into a single string.
- Complete Guide to Bash Special Syntax, Variables, and Expansions A complete reference covering all Bash special syntax, variables, expansion rules, and control structures with examples.