#!/usr/bin/ksh # # This script writes lists of EPO jpg files. It is intended to be used when for some # reason the automatic daily write of file names to the database has failed. # # Written because for some reason the epo_magfile_append script did not write info to # the EPOMAG database on juneau between 2010 and Sep 2011 (when the problem was fixed) # After generating these files it is necessary to write the information to the database using # update_epomag_table_part2.ksh # # lphilpott 7-oct-2011 # broadly copied from epo_magfile_append.ksh ## Set the environment variables # if [[ -z $THMSOC ]] then THMSOC=/disks/socware/thmsoc_dp_current export THMSOC fi . $THMSOC/src/config/thmsoc_epo.config cd $EPO_HOME FIND_TIME=-650 n=0 school=${SCHOOL[$n]} while [[ -n $school ]] do school_dir=$(echo $school | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/') find ./${school_dir} -name ${school}_TS123_\* -mtime ${FIND_TIME} > /home/thmsoc/lphilpotts_stuff/epomagupdate/${school}_ts123_files find ./${school_dir} -name ${school}_TSBDH_\* -mtime ${FIND_TIME} > /home/thmsoc/lphilpotts_stuff/epomagupdate/${school}_tsbdh_files find ./${school_dir} -name ${school}_DS123_\* -mtime ${FIND_TIME} > /home/thmsoc/lphilpotts_stuff/epomagupdate/${school}_ds123_files find ./${school_dir} -name ${school}_DSBDH_\* -mtime ${FIND_TIME} > /home/thmsoc/lphilpotts_stuff/epomagupdate/${school}_dsbdh_files find ./${school_dir} -name ${school}_TSpectra_\* -mtime ${FIND_TIME} > /home/thmsoc/lphilpotts_stuff/epomagupdate/${school}_tspectra_files find ./${school_dir} -name ${school}_DSpectra_\* -mtime ${FIND_TIME} > /home/thmsoc/lphilpotts_stuff/epomagupdate/${school}_dspectra_files n=$(( n + 1 )) school=${SCHOOL[$n]} done exit 0