From 8c90b3439dd8776576c48619eebead5ced675214 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 1 Nov 2020 12:59:22 +0100 Subject: [PATCH] Fix weather module --- modules/weather | 6 +++--- 1 file 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