Bash Projects
Five practical, portfolio-ready Bash projects that combine everything from this series — a server health checker, log analyzer, backup tool, …
Five practical, portfolio-ready Bash projects that combine everything from this series — a server health checker, log analyzer, backup tool, …
Command injection risks, safe handling of secrets, quoting pitfalls that become vulnerabilities, and hardening scripts that run with …
The patterns that separate a throwaway script from a production-grade one — structure, logging, idempotency, configuration, and testing.
Scripting Kubernetes operations with kubectl and Bash — deployment waits, rollout automation, log aggregation, and cluster audit scripts.
Scripting Docker operations from Bash — container entrypoints, health-check waits, cleanup automation, and building images in CI.
Scripting AWS operations with the AWS CLI and jq — EC2 automation, S3 sync, tagging audits, and safe patterns for infrastructure scripts.
Building Bash scripts that parse, filter, rotate, and alert on log files — combining text tools with loops and conditionals into real …
Running remote commands, copying files, and orchestrating multi-server tasks over SSH from Bash scripts, using keys instead of passwords.
Automating connectivity checks, port scans, and API calls from Bash using curl, nc, and the standard networking commands.
Writing crontab schedules, and the environment/PATH pitfalls that make scripts behave differently under cron than in an interactive shell.
Handling SIGTERM, SIGINT, and other signals in Bash scripts with trap, for graceful shutdown and guaranteed cleanup.
Running background jobs from a script, waiting for them, capturing their output, and running tasks in parallel with process control.
Debugging Bash scripts with set -x, bashdb-style tracing, shellcheck, and practical techniques for finding the exact line that's failing.
Exit statuses, set -euo pipefail, trap, and building Bash scripts that fail loudly and safely instead of silently continuing after an error.
Using grep, sed, awk, and cut inside Bash scripts to parse logs, transform config files, and build reports.
stdin, stdout, stderr, file descriptors, redirection operators, pipes, and process substitution in Bash.
Reading, writing, appending, checking, and looping over files in Bash — the everyday file-manipulation patterns used in real scripts.
Positional parameters, shift, getopts, and parsing both short (-e) and long (--environment) flags in Bash scripts.
Defining and calling Bash functions, passing arguments, return values vs exit codes, local scope, and recursion.
Indexed and associative arrays in Bash — declaring, accessing, looping, slicing, and the quoting rules that matter.
for, while, and until loops in Bash — iterating over lists, files, command output, and ranges, plus break and continue.
if/elif/else, case statements, and combining conditions in Bash for real decision-making logic in scripts.
Arithmetic, comparison, logical, and file test operators in Bash — and the crucial difference between [ ], [[ ]], and (( )).
String concatenation, length, substring extraction, case conversion, splitting, and comparison in Bash.
Reading interactive input with read, prompts, hidden password input, timeouts, and reading input from a file or pipe.
Declaring and using variables in Bash, quoting rules, variable scope, readonly and environment variables, and parameter expansion.
What Bash actually is, the shebang line, script permissions and execution, comments, and the anatomy of a first real script.
Write a Python boto3 script that reads the AutoStop=true tag on EC2 instances and automatically stops them at 8 PM and starts them at 8 AM — …
Combine container state with an HTTP check in a Bash script.
Automate a local build with input checks and an explicit release tag.
Create a read-only Bash report of container state.