for script in `find . -name $scriptname  -print`
do
  dir=`dirname $script`
  cd $dir

  for log in `find . -name '*.log' -print`
  do 
    tst=`tail -1 $log`
    if [ `echo $tst | grep 'Total CPU time' | wc -l` -ne 1 -a \
         `echo $tst | grep 'Closing time : ' | wc -l` -ne 1 ] ; then
      echo
      echo 'FILE: ' $dir/$log 
      echo '      ' "$tst"
    fi
  done

  cd $currdir
done


