summaryrefslogtreecommitdiff
path: root/.local/bin/weather
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2023-01-04 18:37:40 -0500
committerJacob McDonnell <jacob@jacobmcdonnell.com>2023-01-04 18:37:40 -0500
commit6e11f434d71a49a6f3dd42d1471eaf7b46003717 (patch)
tree74cbff4ee50f947901b7afd7c38ff04c1dc61e66 /.local/bin/weather
parentb9e00afded90f03ac18f75aa7dfc8e7f3e146348 (diff)
updating scripts
Diffstat (limited to '.local/bin/weather')
-rwxr-xr-x.local/bin/weather2
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/weather b/.local/bin/weather
index 000ba1b..a52a855 100755
--- a/.local/bin/weather
+++ b/.local/bin/weather
@@ -4,7 +4,7 @@ getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1
curl -sf "wttr.in/Ocean+City" > "$HOME/.cache/weatherreport" || exit 1 ;}
showweather() { printf "%s" "$(sed '16q;d' "$HOME/.cache/weatherreport" | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')"
-sed '13q;d' "$HOME/.cache/weatherreport" | grep -o "m\\(-+\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}' ;}
+sed '13q;d' "$HOME/.cache/weatherreport" | grep -o "m\\(-+\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print "❄️",$1 "°","🌞",$2 "°"}' ;}
[ "$(stat -c %y "$HOME/.cache/weatherreport" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] && getforecast
showweather