#!/bin/sh # # sub shell for plotwsys.sh: # runs gnuplot and creates html file for whole data set (since start) # # H.G.Berns (berns@phys.washington.edu), UW Seattle, 20 Jan. 2003 dyear=2003 # homedir=/u/nurock/berns homedir=/u/hans workdir=$homedir/watersys tempdir=$workdir/temp logdir=$workdir/log webdir=$homedir/WWW/watersys/year$dyear datafile=$homedir/WWW/watersys/wsys.last gnuscript=$workdir/wsys_$dyear.gnu htmlfile=$webdir/index.html htmltemp=$webdir/wsys_temp.html logfile=$logdir/plot_$dyear.log starttime=`cat $webdir/wsys_$dyear.data | grep -v "#" | head -1 | awk '{print $1}'` endtime=`tail -1 $webdir/wsys_$dyear.data | awk '{print $1}'` updatetime=`tail -1 $datafile | awk -F. '{print $1}'` cd $tempdir echo "`date`: run gnuplot over the whole data file" > $logfile (/usr/bin/gnuplot $gnuscript) >> $logfile 2>&1 echo "`date`: convert pbm files to gif and move to webdir" >> $logfile echo "" > $htmltemp echo "KEK Watersystem Logs ($dyear)" >> $htmltemp echo "

KEK Watersystem Logs for year $dyear

" >> $htmltemp # echo "
" >> $htmltemp # echo "Please make sure the time stamps below are up to date!
" >> $htmltemp # echo "If they are more than 2 hours behind current time, try a " >> $htmltemp # echo "''Shift-Reload'' of the page." >> $htmltemp # echo "

" >> $htmltemp echo "

data from $starttime until $endtime

" >> $htmltemp echo "last update $updatetime: converted data table
    " >> $htmltemp ppm2gif=/usr/bin/ppmtogif # ppm2gif=$workdir/ppmtogif for file in `ls *.pbm | awk -F. '{ print $1 }'` do echo "$file.pbm --> $file.gif" >> $logfile ($ppm2gif $file.pbm > $file.gif) >> $logfile 2>&1 mv $file.gif $webdir echo "
  1. \"$file\"

    " >> $htmltemp done rm *.pbm echo "


questions? please send comments to " >> $htmltemp echo "HGB @ " >> $htmltemp echo "UW, Seattle.

" >> $htmltemp echo "last automatic ftp/scan/plot: `date`" >> $htmltemp mv $htmltemp $htmlfile echo "`date`: done plotting whole data set" >> $logfile