#!/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 #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`" cd $HOME/search/ToBoulder/data #First send all Health messages if havefiles txt then echo " "Sending Health.txt files to Boulder if scp *Health.txt dataman@140.172.32.7:/nova/home/dataman/FromEureka/data then rm *Health.txt fi else echo " "No Health.txt files to send fi 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:/nova/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`"