From 68b1a561a14c9fcb33a43b88f804a66d445ef741 Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 1 Mar 2023 14:07:39 +0530 Subject: [PATCH] add city variable --- modules/weather | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/weather b/modules/weather index 9bd9f52..1c4dd48 100755 --- a/modules/weather +++ b/modules/weather @@ -6,7 +6,8 @@ get_weather() { - 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//' + CITY=Chandigarh + curl -s v2.wttr.in/$CITY | grep -e "Weather" | sed -n 2p | sed s/Weather://g | sed 's/,//g' | sed 's/+//g' | sed 's/°C.*/°C/' | sed 's/.*m//' }