From 02873a5c93ac5204311cb0dcd3db3753c29a3fc0 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 20 Apr 2017 17:00:56 +1200 Subject: Add shebang and doc to grab-spot --- local/bin/grab-spot | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/local/bin/grab-spot b/local/bin/grab-spot index d116252..989d037 100755 --- a/local/bin/grab-spot +++ b/local/bin/grab-spot @@ -1,3 +1,14 @@ +#!/bin/sh + +# Grabs a spot price for a currency and stores it in ~/.cache +# Useful to run as a cron job and use its cached output in motds or status +# lines +# +# syntax: grab-spot TO FROM +# for example, to get the value of USD in NZD: +# grab-spot USD NZD +# would place a file at ~/.cache/USDNZD containing the value of the USD in NZD, +# to 4 decimal places if [ -z $1 ]; then logger "$0: blank FROM currency" -- cgit v1.1