summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-04-20 17:00:56 +1200
committerDavid Phillips <david@sighup.nz>2017-04-20 17:00:56 +1200
commit02873a5c93ac5204311cb0dcd3db3753c29a3fc0 (patch)
treeb097716044143f8936ae0c6268f03bdbf1792753
parentd58274f06552eca59512db168434d0a81e5cf35f (diff)
downloaddotfiles-02873a5c93ac5204311cb0dcd3db3753c29a3fc0.tar.xz
Add shebang and doc to grab-spot
-rwxr-xr-xlocal/bin/grab-spot11
1 files changed, 11 insertions, 0 deletions
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"