Bash: Guides and Practical Know-how | mironsoft Blog
Bash
-
May 6, 2026
Shell scripts that talk to network services, APIs and external systems fail at the first transient error unless they have retry logic. Exponential backoff with jitter, the timeout command, and clear max retry limits make shell scripts resilient, so an operator does not have to restart them by hand in the middle of the night.
-
Apr 30, 2026
Terraform provisions infrastructure, Ansible configures it, but between the two tools most teams leave a manual gap. Bash glue code closes that gap: read state, generate inventory, trigger playbooks, and handle errors in one central place instead of connecting two tools by copy and paste.
-
Apr 24, 2026
fzf turns any list a Bash script produces into a searchable selection menu. Instead of typing numbers, the user types a few letters and instantly gets a filtered list of matches. This article shows how to integrate fzf into your own scripts, including preview windows, multi-select and a solid fallback for environments without fzf.
-
Apr 24, 2026
Bash-based monitoring scripts provide ready-to-use coverage for servers and containers without external dependencies. CPU/RAM/disk thresholds, HTTP health checks, Docker container status, and automatic alerts by email or webhook, all with plain shell tools and clear alerting logic.
-
Apr 23, 2026
Before a matrix configuration goes live in GitHub Actions or GitLab CI, prototyping it in Bash pays off: run the same combinatorics of versions, operating systems and environments locally through a loop, debug failures directly in the shell, and only then write the final YAML matrix. That saves expensive trial-and-error commits and shows which combinations actually make sense.
-
Apr 22, 2026
Raw text data separated by commas or tabs becomes hard to read as soon as more than three columns are involved. column -t automatically aligns columns, paste merges several files line by line side by side, and together the two tools build readable reports directly in the shell, without any spreadsheet or external table tool.
-
Apr 20, 2026
Exit codes are the only structured interface between Bash scripts. Anyone who understands what 0 to 255 mean, how $? works, when set -e does not trigger and how pipefail rescues pipe exit codes writes scripts that communicate reliably with each other instead of silently overlooking errors.
-
Apr 19, 2026
Anyone who increments a variable inside a while-read loop after a pipe and then finds it back at zero outside the pipe has run into one of Bash's best-known traps: every stage of a pipeline runs in its own subshell. This article explains the mechanism and shows three robust workarounds, from shopt -s lastpipe to process substitution.
-
Apr 18, 2026
Bash can open TCP sockets, build HTTP requests by hand, and test ports without curl, wget, or netcat, through the built-in /dev/tcp pseudo-device. Understanding the mechanics helps you secure minimal containers and restrictive environments, but you also need to know the clear limits: no TLS, no UDP with real feedback, and no header control like a real HTTP client offers.
-
Apr 8, 2026
A cron job that runs at night normally vanishes without a trace for Prometheus: no running process means no scrapable HTTP endpoint. The Node Exporter textfile collector solves that problem by reading simple .prom files from the filesystem that a Bash script writes itself, making cron job duration, success, or failure queryable in Prometheus without any extra service.