Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true; do
- #-------------------
- ltng="http://weather.gc.ca/data/lightning_images/ONT.png"
- #-------------------
- # http://www.weatheroffice.gc.ca/radar/
- radar=`\
- wget -q -O- http://www.weatheroffice.gc.ca/radar/index_e.html?id=WKR \
- | grep image.php \
- | head -1 \
- | cut -d"\"" -f 2 \
- `
- # need to ditch & and replace with & in string.
- # http://tldp.org/LDP/abs/html/string-manipulation.html
- # echo ${stringZ//abc/xyz} # xyzABC123ABCxyz
- # Replaces all matches of 'abc' with # 'xyz'.
- radar=`echo ${radar//&/&}`
- # echo ${radar//&/&}
- radar=http://www.weatheroffice.gc.ca/radar/$radar
- #-------------------
- aqi=http://graphs.eastpole.ca/aqi-today.png
- insol=http://graphs.eastpole.ca/insolation-today.png
- torwat=http://graphs.eastpole.ca/toronto-water-use.png
- # -------------------------------------
- feh -FZd $radar $ltng $aqi $insol $torwat
- # echo $radar $ltng $aqi $insol $torwat
- # Sleeping here does not do what you think.
- # It waits 60 seconds after you quit feh and then recurses.
- # Well that's no good.
- #
- sleep 60
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement