#!/bin/bash

tonight=`/usr/bin/date -d tomorrow -I`
hour=`date +%H`
if (( $hour < 13 )); then
    tonight=`/usr/bin/date -I`
fi
count=0
for fudi in $HOME/ernad/var/reports/*
do
   if [ -f $fudi/opt/learn/mocla/$tonight.amf.xml.gz ]; then
       count=$((count+1))
   fi
done
echo $count
