#!/bin/sh -f
	while :
	do
		./regression_status_report.csh logfiles/ > regression.rpt
		clear
		tail -31 regression.rpt
      
      num_fail=`grep -c ' FAIL ' regression.rpt`
      num_vlce=`grep -c ' VLCE ' regression.rpt`
      num_unk=`grep  -c ' UNKNOWN ' regression.rpt`
      if test $num_fail != 0
      then
         /bin/echo ""
         printf '%-40s %-8s %-8s %-8s\n' "FAIL TEST"  "RTL" "WORST" "BEST"
         /bin/echo "---------------------------------------------------------------------------------------"
         grep ' FAIL ' regression.rpt
         grep ' VLCE '  regression.rpt
         grep ' UNKNOWN ' regression.rpt
      elif test $num_vlce != 0
      then
         /bin/echo ""
         printf '%-40s %-8s %-8s %-8s\n' "FAIL TEST"  "RTL" "WORST" "BEST"
         /bin/echo "---------------------------------------------------------------------------------------"
         grep ' FAIL ' regression.rpt
         grep ' VLCE '  regression.rpt
         grep ' UNKNOWN ' regression.rpt
      elif test $num_unk != 0
      then
         /bin/echo ""
         printf '%-40s %-8s %-8s %-8s\n' "FAIL TEST"  "RTL" "WORST" "BEST"
         /bin/echo "---------------------------------------------------------------------------------------"
         grep ' FAIL ' regression.rpt
         grep ' VLCE '  regression.rpt
         grep ' UNKNOWN ' regression.rpt
      fi

      
		sleep 3
	done
