Bash

Francesco Ciannavei

Bash

I started writing Bash scripts at TUN2U, to automate repetitive operations, and it's been an indispensable tool since. With one command, my apache-instantiate script creates and enables an Apache virtual host on the next free port. The other scripts I write are for deploys, backups and checks.

apache-instantiate

It lives in the IT-Scripts repository. It finds the next free port, creates and enables the virtual host, scaffolds a document root with an index page and reloads Apache. It's written in POSIX shell, so it runs in Bash as well as other shells, and the repository has a Dockerfile to test it in a container instead of on a real server.

Automation in the workflow

Bash is the glue that holds the various tools together: preprocessing data before an import, generating reports, orchestrating builds. Two scripts in particular are told on other pages: the one run by a Git hook that checks package licenses on every commit, and the one that clears this site's cache from a GitHub workflow, described on the Astro page.

Where it runs

Bash fits into my Linux and macOS working environment, and inside the Docker containers where I prepare environments.

Rating
7/10

Where i've used it: