Changeset 12760


Ignore:
Timestamp:
01/24/12 15:04:43 (13 years ago)
Author:
Daniela Dorner
Message:
implemented ftchecksum but left commented; implemented variable for delaytime
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/ZipRawData.sh

    r12621 r12760  
    66# get last 3 nights
    77dates=( `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)
     10delaytime=30 #30 minutes
     11
     12# setup to use ftools
     13export HEADAS=/opt/heasoft-6.11/x86_64-unknown-linux-gnu-libc2.13-0/
     14source $HEADAS/headas-init.sh
    815
    916# do rsync for rawfiles of these dates
     
    5158      fi
    5259
    53       # check if raw file was accessed in the last 30 minutes
    54       isnew=`find $file -amin -30`
     60      # check if raw file was accessed in the last $delaytime minutes
     61      isnew=`find $file -amin -$delaytime`
    5562      if [ "$isnew" != "" ]
    5663      then
    57          echo $file" is not older than 30 min => continue" >> $logfile 2>&1
     64         echo $file" is not older than $delaytime min => continue" >> $logfile 2>&1
    5865         continue
    5966      fi
     
    7986      fi
    8087
     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
    81100      echo `date`": zipping "$file" to "$zipfile" ..." >> $logfile 2>&1
    82101      # zip file to stdout and pipe it to outputfile
Note: See TracChangeset for help on using the changeset viewer.