Merge pull request #20 from Baitinq/master

Fix weather module
This commit is contained in:
Baitinq 2020-11-01 12:01:42 +00:00 committed by GitHub
commit ffcf64777f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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