#!/bin/sh a=0 while [ "$a" == 0 ]; do # sleep until the next 60 seconds are full perl -e 'sleep 60 - time % 60' # temperature=`curl -s http://www.rogerhenriksson.se/temp.php` temperature=`/opt/owfs/bin/owread /10.B1304D010800/temperature` # remove initial whitespace temperature=`expr "$temperature" : '[ ]*\(.*\)'` # I can use N as a replacement for the current time /opt/local/bin/rrdtool update /Library/WebServer/CGI-Executables/temp.rrd N:$temperature echo $temperature " " `date` done # end of while loop