Rain Check
Presenting the rain script. A must have for Canberra commuter cyclists.
Example ("$" is the prompt):
#!/bin/bash
# check the probability of rain.
# Bom URL http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDN10035.txt
wget -q -O - http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?IDN10035.txt | \
grep ^Probability\ of\ rain
Example ("$" is the prompt):
$ rain
Probability of rain: 20% today.
2 Comments:
Wah liao! A bit der overprogramming right? Just check Australian Bureau of Meteorology can liao.
By Ray, at Mon Aug 22, 07:22:00 PM 2005
This is hardly "overprogramming". Just two commands, wget piped into grep. And yes, the first command, wget, does check the Australian Bureau of Meteorology page. The second command, grep, extracts out the line I am interested in. So just typing "rain" beats opening the browser, clicking some bookmark, and looking for that line.
By peterpiper, at Tue Aug 23, 12:34:00 PM 2005
Post a Comment
<< Home