JSON Parsing Nagios Script

Reading Time: 2 minutes

Parsing JSON in Bash is never usually the best idea but sometimes it may be necessary or preferred. Here’s a nice easy script which uses the ‘jq’ command to perform JSON parsing in Bash.


Let’s imagine you have the following JSON which is outputted by a stats gathering process:


Parsing that in Bash by writing some regex’s etc is perfecting possible but there’s an infinitely easier way. Welcome to ‘jq’. Let’s see it in action.

Read More »

Useful to know Bash parameters

Reading Time: 3 minutes

Even having¬†written many hundreds of Bash scripts over the years I sometimes forget the basic special parameters which are available. For that reason I’ve made this post which is a copy of the page from gnu.org.


Read More »

Prevent apcupsd shutting down the OS

Reading Time: 1

If you have an APC UPS you may not, for whatever reason, want the OS to trigger a shutdown. The ‘apcupsd’ package will call shutdown whenever the battery capacity is reported too low. To prevent this, just edit the following file.


Read More »

How to download iplayer content on Linux

Reading Time: 17 minutes

Here is a very simple way to download iPlayer content using a Linux command line tool. This literally downloads the stream and saves it to a file.¬†The best part is, because they’re not DRM protected, you can keep it forever.


Continue reading

How to resize a VirtualBox disk

Reading Time: 1

Very quick post on how to resize a VirtualBox virtual disk.



When using QCOW based disks with Virtual Box there’s no automagic method for resizing the disks. Because of that you first have to convert it. Here’s the commands you need…

Read More »