Bash: Guides and Practical Know-how | Page 11 | mironsoft Blog
Bash
-
Jun 30, 2025
rsync is more than a copy tool: with the right flags it becomes a full deployment engine. --delete for exact mirrors, --exclude-from for clean exclusions, --checksum for reliable transfers, --link-dest for atomic deployments, and --bwlimit for controlled bandwidth make rsync the standard for professional server deployments.
-
Jun 29, 2025
gum and whiptail turn a Bash script into an application with real borders, forms and confirmation dialogs, without needing a graphical interface. This article shows how to use both tools in your own scripts, where they differ, and when the effort pays off compared to plain Bash built-ins.
-
Jun 21, 2025
Anyone who starts long running processes on a remote server while relying on a plain SSH terminal risks losing all progress the moment the connection drops. tmux and GNU Screen solve this by decoupling sessions from the actual terminal and keeping them running in the background, whether the connection wobbles or the laptop lid closes.
-
Jun 15, 2025
An environment variable that works fine in the administrator's shell but is simply missing inside the PHP-FPM process of a Magento application is one of the most common puzzles in daily server operations. The reason is almost always scope: environment variables are only inherited by child processes, never backward and never across independent process trees, and system wide scope works fundamentally differently from user specific scope.
-
Jun 14, 2025
Anyone who only checks WebSocket endpoints in the browser with DevTools loses reproducibility and automatability. With openssl, curl and websocat, you can test WebSocket connections with Bash, walk through the handshake by hand, and wire connection checks straight into the CI pipeline.
-
Jun 13, 2025
Shell scripts that inform the operator instead of confusing them are more maintainable, safer and more pleasant to use. With tput, ANSI codes, spinners, column and printf tables, professional CLI UX emerges without external dependencies, directly in Bash, portable and geared toward robustness.
-
Jun 12, 2025
Free-text logs are pleasant for humans reading a terminal, but a poor contract for automated evaluation: any wording change breaks existing parsers. Structured JSON logging writes every log line as a clearly defined object with fixed fields instead, one that forwards losslessly to ELK, Loki, or any other aggregation system, with jq as the right tool for building those objects correctly and safely.
-
Jun 6, 2025
Most developers know set -x only as a quick switch for more output and never use more than the default setting. With a customized PS4, targeted redirection of the trace output and selective switching on and off, set -x turns from a blunt tool into a precise Bash tracing technique that can also be safely used in CI pipelines.
-
Jun 4, 2025
A deployment made of five Bash scripts called one after another leaves behind five isolated log fragments without a shared identifier, fragments that are nearly impossible to reassemble into a coherent flow after the fact. A correlation ID, generated once at the start and consistently passed via an environment variable to every called script and process, turns those fragments into a searchable, connected trace.
-
Jun 4, 2025
curl -fsSL https://install.example.com | bash installs in a single line, but runs code with the calling user's full privileges before anyone has actually looked at it. Understanding exactly what risks this pattern brings makes it possible to substantially harden it with a few extra steps, without giving up all the convenience for end users.