You are here

Writing Cleaner Bash Scripts

Thursday, 1 March, 2018 - 19:30

Tonight's talk will be given by Tai Kedzierski, covering bash scripting and how to write clean scripts.

Writing shell scripts is a common system administrator task, and whilst a programming practice, generally does not follow the same rigours of software development process - as a result, bash scripts are often regarded merely as ugly, unmaintainable shims.

Tai will give some examples of some of his bash scripts from years ago, compared to their cleaner counterparts today, and how he has tried to treat bash as a "real" programming language using shellcheck, git version control, and bash-builder.

From using functions and organising logic, to setting up for simple unit testability as well as improved practices,
some of what will be covered will be specifically for GNU/bash , some will also be applicable in Bourne Shell (what's the difference? I'll tell you on the night :-p) , and some might even be extendable to all scripting.

bash :

git :

Shellcheck :



If you have never been to one of these meetings, just know that it's friendly and informal - grab a pint or a soda, come ask questions, get help with open source software and Linux, or simply rant & rave!

There will also be a Linux laptop on hand for a quick show and tell for anyone who is curious, and you can also bring your own laptop to troubleshoot Linux, or try Linux on your own laptop - without installing it.

The meeting will be in the back room of the Southsider pub, West Richmond Street, Edinburgh from 7:30pm, with a brief introduction to Linux, open source and free software for any newcomers.

The scheduled talk will start at 8pm.

Event type: