Changeset 12760 for trunk/DataCheck/ZipRawData.sh
- Timestamp:
- 01/24/12 15:04:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/ZipRawData.sh
r12621 r12760 6 6 # get last 3 nights 7 7 dates=( `date +%Y/%m/%d` `date +%Y/%m/%d --date="-1day"` `date +%Y/%m/%d --date="-2day"` `date +%Y/%m/%d --date="-3day"` ) 8 9 # time rawfile is untouched before further processing (i.e. adding checksum and zipping) 10 delaytime=30 #30 minutes 11 12 # setup to use ftools 13 export HEADAS=/opt/heasoft-6.11/x86_64-unknown-linux-gnu-libc2.13-0/ 14 source $HEADAS/headas-init.sh 8 15 9 16 # do rsync for rawfiles of these dates … … 51 58 fi 52 59 53 # check if raw file was accessed in the last 30minutes54 isnew=`find $file -amin - 30`60 # check if raw file was accessed in the last $delaytime minutes 61 isnew=`find $file -amin -$delaytime` 55 62 if [ "$isnew" != "" ] 56 63 then 57 echo $file" is not older than 30min => continue" >> $logfile 2>&164 echo $file" is not older than $delaytime min => continue" >> $logfile 2>&1 58 65 continue 59 66 fi … … 79 86 fi 80 87 88 # # update the raw file with the checksums 89 # ftchecksum update=yes $file >> $logfile 2>&1 90 # check=$? 91 # if [ $check -eq 0 ] 92 # then 93 # echo `date`": file "$file" was updated with the checksums " >> $logfile 2>&1 94 # else 95 # echo `date`": problem when updating file "$file" (ftchecksum exited with "$check")" >> $logfile 2>&1 96 # echo `date`": problem when updating file "$file" (ftchecksum exited with "$check")" 97 # continue 98 # fi 99 81 100 echo `date`": zipping "$file" to "$zipfile" ..." >> $logfile 2>&1 82 101 # zip file to stdout and pipe it to outputfile
Note:
See TracChangeset
for help on using the changeset viewer.