tFix Fog alert - nws-forecast-mailer - fetch and deliver the NWS 48-hour forecast by email
HTML git clone git://src.adamsgaard.dk/nws-forecast-mailer
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 7cc083bbd0eba702c73bdb2dd3e9ef626abbd6e4
DIR parent eb3057bbaf957254ff489bfd8c13094dcdc86f03
HTML Author: Anders Damsgaard <andersd@riseup.net>
Date: Wed, 10 Jan 2018 11:58:57 -0500
Fix Fog alert
Diffstat:
M forecast_alert.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
DIR diff --git a/forecast_alert.sh b/forecast_alert.sh
t@@ -13,8 +13,7 @@ out=$(fetch $latitude $longitude)
# any fog in the next 48 hours?
keyword="Fog"
-if echo "$out" | grep "^$keyword" | grep '[0-9]' >/dev/null; then
-
+if echo "$out" | grep "^$keyword" | grep '[A-Z]' >/dev/null; then
message=$(cat <<-END
Next 24 hours:
t@@ -38,5 +37,3 @@ END
else
echo "No $keyword predicted within the next 48 hours"
fi
-
-