Originally published on eve.gd on 14 July 2013.
Read this post on the web (with images, PDF and citation details)
OK, this is probably one of the most specific posts I've ever written, but...
I wrote a bash script to automatically fetch and parse the currently used data on the 4G EE mobile network in the UK that can then be used with Conky. It's a compact one liner that looks like this:
#!/bin/bash
wget -qO- http://add-on.ee.co.uk/status | awk -v OFS=' / ' -v ORS='' '/<span class="data-used">/{sub(/^[^0-9]*/, ""); dused=$0; match(dused, /^([0-9].?[0-9]?).+([0-9][^G]?[0-9]?)/, arr);} END {print arr[1], arr[2];}'
You can then call this from a conkyrc file with something like this:
${color #F09000}Mobile Usage${color #707070}:${color white} ${execi 900 ~/.scripts/getusage.sh}GB