Ignore:
Timestamp:
04/21/13 01:45:29 (12 years ago)
Author:
Daniela Dorner
Message:
adapted such that it treats only the current night during night, but the last six nights during day
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Processing/FillAuxData.sh

    r15298 r15398  
    8585
    8686
    87 # get last 3, 6 or 9 nights
    88 dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \
    89         `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \
    90 #        `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \
    91         )
     87# get current hour
     88hour=`date +%k`
     89if [ $hour -le 7 ] || [ $hour -ge 19 ]
     90then
     91   dates=( `date +%Y/%m/%d --date="-12hour"` )
     92else
     93   # get last 3, 6 or 9 nights
     94   dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \
     95           `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \
     96#           `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \
     97           )
     98fi
    9299#dates=( `find $ziprawdata -mindepth 3 -type d | sort | sed "s/\${ziprawdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw
     100
     101
    93102printprocesslog "INFO processing the following night(s): "${dates[@]}
    94103echo  `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1
Note: See TracChangeset for help on using the changeset viewer.