#!/bin/bash #Title: DailyBoulderArchive.bash #Purpose: To archive the daily incoming data from Eureka in the Boulder archive. echo " Start DailyBoulderArchive.bash `date -u`" export PATH=$HOME/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin if [ -d /eureka ]; then cd /home/dataman/FromEureka/data if havefiles csv then for f in *.csv do if cp -f "$f" /eureka/mwradiometer/work then rm "$f" fi done fi if havefiles CalTable then for f in *CalTable* do if cp -f "$f" /eureka/mmcr/CalTable then rm "$f" fi done fi if havefiles Health.txt then for f in *Health.txt do if cp -f "$f" /eureka/mmcr/Health then rm "$f" fi done fi if havefiles MMCRMom then for f in *MMCRMom* do if cp -f "$f" /eureka/mmcr/Mom then rm "$f" fi done fi if havefiles MMCRSpecMom then for f in *MMCRSpecMom* do if cp -f "$f" /eureka/mmcr/Spec then rm "$f" fi done fi cd Licor if havefiles zip then for f in *zip do if cp -f "$f" /eureka/licor then rm "$f" fi done fi cd .. cd Sonic if havefiles zip then for f in *zip do if cp -f "$f" /eureka/sonic then rm "$f" fi done fi cd .. cd TowerMet if havefiles met then for f in *met do if cp -f "$f" /eureka/towermet then rm "$f" fi done fi cd .. cd /home/dataman/FromEureka/daily if havefiles eurmmcr then for f in eurmmcr*.png do if cp -f "$f" /eureka/quicklooks/mmcr then cp -f "$f" /archive/et6web/eureka/images cp -f "$f" /archive/et6web/eureka/images/measurements/mmcr rm "$f" fi done fi if havefiles eurmwrinst then for f in eurmwrinstql*.png do if cp -f "$f" /eureka/quicklooks/mwradiometer then cp -f "$f" /archive/et6web/eureka/images/diagnostics/mwr rm "$f" fi done fi if havefiles eurmwrtb then for f in eurmwrtb*.png do if cp -f "$f" /eureka/quicklooks/mwradiometer then cp -f "$f" /archive/et6web/eureka/images/measurements/mwr rm "$f" fi done fi if havefiles eurmwrret then for f in eurmwrret*.png do if cp -f "$f" /eureka/quicklooks/mwradiometer then cp -f "$f" /archive/et6web/eureka/images/retrievals/mwr rm "$f" fi done fi if havefiles eurqclog then for f in eurqclog*.txt do if cp -f "$f" /eureka/logs/qcsummary then cp -f "$f" /archive/et6web/eureka/images/diagnostics/qcsum rm "$f" fi done fi if havefiles eutlic then for f in eutlic*.png do if cp -f "$f" /eureka/quicklooks/licor then cp -f "$f" /archive/et6web/eureka/images/measurements/licor rm "$f" fi done fi if havefiles eutson then for f in eutson*.png do if cp -f "$f" /eureka/quicklooks/sonic then cp -f "$f" /archive/et6web/eureka/images/measurements/sonic rm "$f" fi done fi if havefiles Search then for f in Search*.log do if cp -f "$f" /eureka/logs/dailycron then cp -f "$f" /archive/et6web/eureka/images/diagnostics/cron rm "$f" fi done fi else echo " /eureka is not mounted" fi echo " Finished DailyBoulderArchive.bash `date -u`"