#!/bin/sh #------------------------------------------------------------------------------- # ~/bin/weather : grab current temperature from local weather station # # usage : normally used as a GNU/screen backtick # # notes : 1. Fiddle awk variables or add converter for Celsius only # : 2. Change STATION's KISP to whatever for your local station # : 3. Delay between updates is 20 minutes by default #------------------------------------------------------------------------------- station='http://weather.noaa.gov/weather/current/KISP.html' delay=1200 cpink="\033p\033[38;5;162m" cdflt="\033[0m\033" temp=$(curl -s $station | grep 'F (' | head -n 1 | awk '{print $3}') echo -e $cpink $temp $cdflt exit 0