Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Hey Now...

Here's the script I'm using to get the weather:

curl --silent "http://www.accuweather.com/en/us/englewood-fl/34224/weather-forecast/332381" | awk -F\' '/acm_RecentLocationsCarousel.push/{print substr($13,10,20)" "$10"°" }'| sed 's/"});//' | head -1

Works great.

Anyone know how I can modify this script to just give me the local humidity?

Thanks.
I'd never used GeekTool before. It looks neat. This ought to get you the humidity:

Code:
curl --silent "http://www.accuweather.com/en/us/englewood-fl/34223/hourly-weather-forecast/332381" | awk 'FNR==1826 { gsub(/^[ \t]+|[ \t]+$/, ""); print }' | awk '{print "Humidity: " substr($0, 7, 3)}'
 
Last edited:
Wel, it was working, but it was't accurate. Now I I just have the humidity label with no data. I've tried reloading the script twice :(
 
Wel, it was working, but it was't accurate. Now I I just have the humidity label with no data. I've tried reloading the script twice :(
Alright, I tweaked the code (I was pulling the humidity from the next hour, not the current one) and updated my original post.
 
Thanks bro! The GREP argument fixed it! It's still off, but I think with some mods I can get it more accurate.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.