
Shell Scripting
How to Write a Shell Script Template You Can Reuse
A reusable Bash script template with strict mode, usage text, option parsing, logging, temp file cleanup and a main function, plus notes on what to strip out.
6 min read
Tag
2 posts

A reusable Bash script template with strict mode, usage text, option parsing, logging, temp file cleanup and a main function, plus notes on what to strip out.

Use docker inspect with the --format flag and Go templates to pull out IP addresses, ports, mounts, health and exit codes, and feed them to scripts.