#! /bin/csh # getoasis - C Shell script to download data from OASIS mooring at M1 # and extract the data # cd /usr/local/oasis/raw set noclobber set datafilebase = `date +%y%j` set failmail = hebo@mbari.org set i = 0 while ( -e oasis.$datafilebase.$i ) @ i++ end set datafile = oasis.$datafilebase.$i set errorfile = ../error/$datafile ../bin/getoasis >& $datafile set rtnsts = $status if ( $rtnsts ) then mailx -s "Failed OASIS Download" $failmail << ! Download failure of file $datafile Return code was $rtnsts `date` ! else ../bin/extract $datafile >& $errorfile if ( -z $errorfile ) \ rm -f $errorfile endif