Index: trunk/DataCheck/Transfer/CheckTransfer.sh
===================================================================
--- trunk/DataCheck/Transfer/CheckTransfer.sh	(revision 17888)
+++ trunk/DataCheck/Transfer/CheckTransfer.sh	(revision 17889)
@@ -92,19 +92,18 @@
 do 
    logfile=$logpath"/transfer/CheckTransfer_"`echo $date | sed -e 's/\//-/g'`".log"
+
+   echo ""
+   echo "" >> $logfile2 2>&1
+   echo "Processing "$date" ..." 
+   echo "Processing "$date" ..." >> $logfile2 2>&1
+
+   # avoid that already checked days are checked again
    if grep "EVERYTHING" $logfile >/dev/null
    then
-      echo $date" has been checked already and is fine."
-      echo $date" has been checked already and is fine." >> $logfile2 2>&1
+      echo " "$date" has been checked already and is fine. Please check logfile "$logfile
+      echo " "$date" has been checked already and is fine. Please check logfile "$logfile >> $logfile2 2>&1
+      sendemail="yes"
       continue
    fi
-   #echo ""
-   #echo ""
-   #echo ""
-   #echo "" > $logfile 2>&1
-   #echo "" >> $logfile 2>&1
-   #echo "" >> $logfile 2>&1
-   echo "Processing "$date" ..." 
-   echo "Processing "$date" ..." > $logfile 2>&1
-   echo "Processing "$date" ..." >> $logfile2 2>&1
    if [ "$certaindate" != "" ]
    then
@@ -342,49 +341,34 @@
    #fi
    
+   short2=
    if [ "$result1" != "0-0000" ] && [ "$short" != "no" ]
    then
-      short="yes"
-   fi
-   
-   if [ "$short" = "yes" ] 
+      short2="yes"
+   fi
+   
+   if [ "$short2" = "yes" ] 
    then
       printprocesslog "number of files does not yet agree in all sites ("$result1") -> do no further checking."
+      echo "" >> $logfile 2>&1
       echo "number of files does not yet agree in all sites ("$result1") -> do no further checking." >> $logfile 2>&1
-      echo "" 
+      echo "" >> $logfile 2>&1
+      # print to console
       echo "SUMMARY for "$date
       echo "-----------------------"
       echo "  number of files does not yet agree in all sites: "${newdaq[0]}" (newdaq) "${daq[0]}" (daq) "${zip[0]}" (data) "${dl00[0]}" (dl) "${wue[0]}" (wue) "${archive[0]}" (arch) "${fails[0]}" (fails) "${qla[@]}" (qla) "$numdatruns" (datruns) "
-      echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile
-      echo "" 
+      echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile
+      # print to single logfile
       echo "SUMMARY for "$date >> $logfile 2>&1
       echo "-----------------------" >> $logfile 2>&1
       echo "  number of files does not yet agree in all sites: "${newdaq[0]}" (newdaq) "${daq[0]}" (daq) "${zip[0]}" (data) "${dl00[0]}" (dl) "${wue[0]}" (wue) "${archive[0]}" (arch) "${fails[0]}" (fails) "${qla[@]}" (qla) "$numdatruns" (datruns) " >> $logfile 2>&1
-      echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile >> $logfile 2>&1
-      echo "" >> $logfile 2>&1
+      echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile 2>&1
+      # print to global logfile
       echo "SUMMARY for "$date >> $logfile2 2>&1
       echo "-----------------------" >> $logfile2 2>&1
       echo "  number of files does not yet agree in all sites: "${newdaq[0]}" (newdaq) "${daq[0]}" (daq) "${zip[0]}" (data) "${dl00[0]}" (dl) "${wue[0]}" (wue) "${archive[0]}" (arch) "${fails[0]}" (fails) "${qla[@]}" (qla) "$numdatruns" (datruns) " >> $logfile2 2>&1
-      echo "  "$date" is not yet transfered completely. For more details, please check the logfile "$logfile >> $logfile2 2>&1
-      echo "" >> $logfile2 2>&1
-      #echo "number of files does not yet agree in all sites ("$result1") -> do no further checking. "
-      #echo "disk: "
-      #echo "  newdaq  "${newdaq[@]}
-      #echo "  daq     "${daq[@]}
-      #echo "  data    "${zip[@]}
-      #echo "  dl00    "${dl00[@]}
-      #echo "  wue     "${wue[@]}
-      #echo "  arch    "${archive[@]}
-      #echo "  fail    "${fails[@]}
-      ##echo "  phido   "${phido[@]}
-      #echo "db: "
-      #echo "  runinfo "$numruns
-      #echo "  rsynced "$numrsynced
-      #echo "  isdc    "$numisdc
-      #echo "  wue     "$numwue
-      ##echo "  phido   "$numphido
+      echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile2 2>&1
       continue
    fi
    
-   #result=$result"-"
    # check du for raw files 
    # la palma
@@ -863,8 +847,9 @@
    then 
       echo "  EVERYTHING is ok. "$date" can be deleted. "
+      echo "" >> $logfile 2>&1
       echo "  EVERYTHING is ok. "$date" can be deleted. " >> $logfile 2>&1
       echo "  EVERYTHING is ok. "$date" can be deleted. " >> $logfile2 2>&1
       echo "    Details in the logfile "$logfile
-      echo "    Details in the logfile "$logfile >> $logfile 2>&1
+      echo "" >> $logfile 2>&1
       echo "    Details in the logfile "$logfile >> $logfile2 2>&1
       sendemail="yes"
@@ -876,12 +861,14 @@
          echo "  "${fails[0]}" file(s) corrupt (fails folder), but files are transfered correctly. " >> $logfile2 2>&1
          echo "  TRANSFER is ok. "$date" can be deleted. "
+         echo "" >> $logfile 2>&1
          echo "  TRANSFER is ok. "$date" can be deleted. " >> $logfile 2>&1
          echo "  TRANSFER is ok. "$date" can be deleted. " >> $logfile2 2>&1
          echo "    Details in the logfile "$logfile
-         echo "    Details in the logfile "$logfile >> $logfile 2>&1
+         echo "" >> $logfile 2>&1
          echo "    Details in the logfile "$logfile >> $logfile2 2>&1
          sendemail="yes"
       else
          echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile
+         echo "" >> $logfile 2>&1
          echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile 2>&1
          echo "  "$date" is not yet transfered completely. Please check the logfile "$logfile >> $logfile2 2>&1
