diff options
author | Your Name <you@example.com> | 2020-11-01 12:59:22 +0100 |
---|---|---|
committer | Your Name <you@example.com> | 2020-11-01 12:59:22 +0100 |
commit | 8c90b3439dd8776576c48619eebead5ced675214 (patch) | |
tree | 7b165c7169e6b3e4853f6bf16c09f9aca2cf6d27 /modules | |
parent | 88628f81aad47015b0f7fe202adcc157ce268406 (diff) |
Fix weather module
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/weather | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/weather b/modules/weather index 42887b7..5782f53 100755 --- a/modules/weather +++ b/modules/weather @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/local/bin/bash # Deps: # curl @@ -6,10 +6,10 @@ get_weather() { - curl -s v2.wttr.in | grep -e "Weather" | sed 's/C,.*/C/g; s/+//g; s/.*\[0m.//g; s/.//2' + curl -s v2.wttr.in | grep -e "Weather" | sed -n 2p | sed s/Weather://g | sed 's/,//g' | sed 's/+//g' | sed 's/°C.*/°C/' | sed 's/.*m//' } -if [ $(( 10#$(date +'%S') % 30 )) -eq 0 ]; then +if [ $(( 10#$(date '+%S') % 30 )) -eq 0 ]; then get_weather fi |