A quick note on 18.04 not being available through the upgrade manager to date. Canonical prefers to make the upgrade for the 16.04 LTS available once the point release 18.04.1 (which includes several LTS stability fixes) is available. This way, the system running the older LTS version remains stable after upgrading to the newer LTS version.
Thanks John. Excellent recommendation here. I was never a fan of the big || concat construct but wasn’t aware of the FORMAT method. So much cleaner. I just tested and updated my gist. This is the main reason why I post this on Medium. To get more input from people who want to improve the algorithm.