mirror of
https://github.com/alexanderepstein/Bash-Snippets
synced 2018-11-08 02:59:35 +01:00
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.
This commit is contained in:
parent
0e24bf81f0
commit
c60f888b32
1 changed files with 0 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue