Bash: Guides and Practical Know-how | Page 10 | mironsoft Blog
Bash
-
Jul 24, 2025
Anyone who writes shell scripts without error handling and clear patterns builds technical debt into their automation. set -euo pipefail, trap, arrays, and job control replace fragile ad hoc scripts with traceable, maintainable Bash patterns that also run reliably in CI/CD pipelines.
-
Jul 23, 2025
Bash scripts quickly grow beyond the size of a single one-liner. Anyone who consistently uses functions, local scope with local and declare, libraries via BASH_SOURCE, and namerefs builds automation that remains understandable and extensible even a year later.
-
Jul 22, 2025
Quoting in Bash is the most underestimated topic in shell programming. Word splitting and globbing break scripts in ways that are invisible while you write them, yet they show up reliably in production data with spaces, special characters and wildcards. This article covers all the common quoting mistakes and shows the correct alternatives.
-
Jul 19, 2025
Sequential shell scripts leave CPU cores and network bandwidth unused. xargs -P, GNU Parallel and manual worker scripts enable real parallelization in the shell, with controllable job slots, reliable error detection and throttling mechanisms for resource sensitive environments.
-
Jul 18, 2025
Anyone who edits hundreds of configuration files by hand will make mistakes. sed -i, awk, perl -pi and find+xargs enable safe bulk transformations of text files, with dry-run mode, automatic backups and atomic in-place changes that preserve the original state even when something goes wrong.
-
Jul 14, 2025
A here-string sends a single configuration value straight to the standard input of a validation command like jq or grep -P using the <<< operator, without ever creating a temp file. For small, repeated checks inside loops, that is both faster and simpler to clean up than any alternative involving a temp file or an extra echo subshell.
-
Jul 9, 2025
Anyone who writes Bash scripts with hardcoded paths and rigid parameters forces themselves into manual editing on every run. Cleanly parsing arguments and flags in Bash means building scalable CLI interfaces with getopts, manual long-option loops, complete validation and understandable usage output that fit into any pipeline.
-
Jul 6, 2025
A shell script that runs fine on a developer's MacBook fails inside an Alpine-based CI container, because macOS ships Bash 3.2 and Alpine only includes BusyBox sh. Understanding the line between portable POSIX shell and Bash-specific features is a prerequisite for shell code that works reliably across a team.
-
Jul 4, 2025
Release notes speak to users and stakeholders, not developers, and therefore need a different tone than a technical changelog. This article shows how a Bash script automatically builds readable release notes with contributors, highlighted key changes, and a comparison link from the commit range between two tags, and pushes them directly to the GitHub or GitLab Release API.
-
Jul 4, 2025
Every CI pipeline that reinstalls dependencies or rebuilds artifacts from scratch on every run wastes time and money. A Bash script that consistently derives its cache key from a checksum of the relevant files ensures a cache gets invalidated automatically the moment something changes, and reused reliably otherwise.