Bash: Guides and Practical Know-how | Page 4 | mironsoft Blog
Bash
-
Feb 10, 2026
An expired TLS certificate is one of the few failures that can take a shop completely offline without a single code bug behind it. Monitoring TLS certificate expiry with Bash and openssl catches looming outages weeks in advance and prevents the midnight emergency call.
-
Feb 8, 2026
For quickly debugging an incoming webhook locally, you do not need a full HTTP server. A minimal webhook receiver with netcat and a Bash loop accepts requests, shows headers and body, and answers with a valid HTTP response, in a few lines and with no dependencies.
-
Feb 8, 2026
Release scripts, branch validation, CI/CD triggers, and automatic merge strategies: anyone mapping Git workflows in Bash needs robust error handling, safe branch checks, and precise API calls against the GitLab REST API so deployments do not get stuck halfway through.
-
Feb 8, 2026
Filenames with spaces, tabs, newlines, and non-printable characters exist on every system. Most shell scripts handle them incorrectly, resulting in silent data corruption, failed operations, or even security problems. Null delimiters, printf, and defensive file operations are the answer to safe file handling in the shell.
-
Feb 7, 2026
Every piece of user input that flows unvalidated into a Bash command is a potential command injection vector. This article shows how attackers exploit arguments, environment variables, and file contents, where plain quoting reaches its limits, and how whitelisting, wrapper functions, and targeted tests systematically harden Bash scripts against command injection.
-
Jan 26, 2026
Anyone who has set an environment variable in an SSH session only to find it missing inside a cron job knows this problem well. Bash loads a completely different set of startup files depending on context. The load order of profile, bash_profile and bashrc decides which configuration actually takes effect, and this exact detail is where most administrators get stuck.
-
Jan 22, 2026
A crontab entry is only the beginning of a cron job. Without locking, jobs run in parallel. Without logging, errors disappear. Without monitoring, a broken cron job can run unnoticed for weeks. flock, structured logging, exit code checks and systemd timers turn fragile cron calls into reliable, observable automation units.
-
Jan 12, 2026
Bash ships with a built-in tool for checking whether a TCP port on another host is reachable, through the pseudo file /dev/tcp, with no need for netcat, nmap, or an extra package. For simple reachability checks in monitoring and deployment scripts that is often plenty, but for real security analysis or large network ranges it is the wrong toolset.
-
Jan 12, 2026
Anyone running both AWS and Google Cloud quickly ends up writing two parallel worlds of scripts with different pagination, error handling, and output formats. Bash patterns for the AWS and gcloud CLI unify authentication, retry logic, and JSON processing behind a shared interface instead of reinventing each cloud separately.
-
Jan 6, 2026
A heredoc lets you embed multi-line text directly in a script without escaping every single line. But without knowing the difference between <<EOF, <<-EOF and a quoted delimiter line, you end up with configuration files containing accidentally expanded variables or broken indentation. This article covers the patterns that actually matter in real deployment scripts.