diff options
| author | Jacob McDonnell <jacob@simplelittledream.com> | 2023-01-19 19:42:29 -0500 |
|---|---|---|
| committer | Jacob McDonnell <jacob@simplelittledream.com> | 2023-01-19 19:42:29 -0500 |
| commit | 1135ed7b98574797f6e6b99eb1604d42afff5059 (patch) | |
| tree | d295236c3e1d2c80bf4a1ff39bafacb20adf496a /.local/bin/weather | |
| parent | 26334cc3cf49a3e1afb1eb5a40599bb97cc3b5f1 (diff) | |
| parent | 56919b86e5e8612e3cf432eb5b9a110f4526f0eb (diff) | |
Merge branch 'macOS' of github.com:JacobMcDonnell/dotfiles into macOS
Diffstat (limited to '.local/bin/weather')
| -rwxr-xr-x | .local/bin/weather | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/weather b/.local/bin/weather index a52a855..664b0b1 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 |
