aboutsummaryrefslogtreecommitdiff
path: root/weather
diff options
context:
space:
mode:
Diffstat (limited to 'weather')
-rwxr-xr-xweather10
1 files changed, 10 insertions, 0 deletions
diff --git a/weather b/weather
new file mode 100755
index 0000000..c49e3ae
--- /dev/null
+++ b/weather
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# weather: Quickly check the weather forecast.
+
+DEFAULT="grand+rapids"
+
+CITY=$(echo "$1" | tr ' ' '+')
+: "${CITY:=$DEFAULT}"
+
+curl -s "https://wttr.in/$CITY" | head -n -2