Jay Sprenkle wrote:
> LOL! You should look at a function to determine if a day is a holiday.
> Talk about ugly! In some places you literally need to know the weather
> and the phase of the moon!
>
> --

[EMAIL PROTECTED] ~/movie]$ pom
The Moon is Waning Gibbous (100% of Full)

[EMAIL PROTECTED] ~/movie]$ which pom
/usr/games/pom

is there a shell script program to let me know if the weather is clear
in mecca? ;)


wget -O - "http://www.weather.com/outlook/travel/businesstraveler/local/SAXX0013?from=search_current"; | \
grep "B CLASS=obsTextA" | \
grep -v "\&deg" | \
awk -F "<" "{ print \$5 }" | \
awk -F ">" "{ print \$2 }"

Today it returns "Party Cloudy".


Solution is non optimal. There is probably a much better way to do it in perl, but I'm too lazy to try right now. Subject to break whenever weather.com's webmaster change their HTML layout. Tested on an up-to-date Gentoo Linux (2006.1)







-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to