Index: trunk/DataCheck/Processing/FillRatescans.sh
===================================================================
--- trunk/DataCheck/Processing/FillRatescans.sh	(revision 17896)
+++ trunk/DataCheck/Processing/FillRatescans.sh	(revision 17906)
@@ -13,12 +13,21 @@
 # filling is done by macro and update is always done
 
-# get last 3, 6 or 9 nights
-dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \
-#        `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \
-#        `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \
-        )
-#dates=( `find -L $ziprawdata -mindepth 3 -type d | sort -r | sed "s/\${ziprawdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw
+# get dates
+if [ "$certaindate" != "" ]
+then
+   checkstring=`echo $certaindate | grep -E -o '^20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]$'`
+   if [ "$checkstring" = "" ]
+   then
+      echo "Please give the variable certaindate in the correct format (YYYY/MM/DD)"
+      finish
+   fi
+   getdates $certaindate
+else
+   # get all night
+   #getdates "all"
+   # get last 6 nights
+   getdates 6
+fi
 
-#dates=( "2013/01/31" )
 
 printprocesslog "INFO processing the following night(s): "${dates[@]}
