From c60f888b32205e81ee13099a6e1adcd44bda48a7 Mon Sep 17 00:00:00 2001 From: Alex Epstein Date: Tue, 2 Jan 2018 19:20:26 -0500 Subject: [PATCH] Fixing issue where weather would not find the location In a state such as conencticut with a shortned name CT it doesnt work to grab the first two letters CO. --- weather/weather | 2 -- 1 file changed, 2 deletions(-) diff --git a/weather/weather b/weather/weather index f5d8dfe..fe326c3 100755 --- a/weather/weather +++ b/weather/weather @@ -43,8 +43,6 @@ getIPWeather() region=$(httpGet ipinfo.io/region) > /dev/null if [[ $(echo $region | wc -w) == 2 ]];then region=$(echo $region | grep -Eo "[A-Z]*" | tr -d "[:space:]") - else - region=$(echo "$region" | cut -c "1-2" | tr "[:lower:]" "[:upper:]") fi httpGet $locale.wttr.in/$city,$region$1 else ## otherwise we are going to use longitude and latitude