#!/bin/bash #This script gets sends MMCR data to Boulder # from the /home/dataman/search/ToBoulder/data directory # within specified time periods. #Matthew Shupe #August 10, 2005 # Modified March 3, 2006 (added Paeri) #Set the path export PATH=$HOME/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin #Set the ending time limit for data transfer (in HHMM UTC) providing a 15 minute buffer. # Eureka time is UTC+5 hours so 2300 to 0700 CST is 0400 to 1200 UTC endtime=1345 echo "Start ArchiveToBoulder.bash `date -u`" #First send all MMCR Health messages cd $HOME/search/ToBoulder/data if havefiles txt then echo " "Sending Health.txt files to Boulder if scp *Health.txt dataman@140.172.32.7:/home/dataman/FromEureka/data then rm *Health.txt fi else echo " "No Health.txt files to send fi #Next send PAERI files to Moscow cd $HOME/search/ToMoscow if havefiles * then echo " "Sending PAERI files to Moscow if scp * dataman@140.172.32.7:/home/dataman/FromEureka then rm * fi else echo " "No PAERI files to send fi #Finally, send MMCR Mom files to Boulder cd $HOME/search/ToBoulder/data if havefiles zip then echo " "Sending MMCRMom.nc.zip data to Boulder for f in *nc.zip do if scp "$f" dataman@140.172.32.7:/home/dataman/FromEureka/data/"$f" then rm "$f" fi curtime=`date +%H%M` if [ $curtime -gt $endtime ] then break fi done else echo " "No MMCRMom.nc.zip data to send fi echo "Stop ArchiveToBoulder.bash `date -u`"