#
#	Crunch the raw output from the various benchmarks into
#	a reasonably neat listing.  Sorry, this is gross shell
#	programming to the max.
#
TMP=/tmp/$$
RPT=$2; export RPT
cp $1 $TMP
ed - $TMP <<EOF
H
g/^\$/d
g/^[0-9].*/d
g/^	/s///
g/^for/d
g/^File/d
g/^Normal/d
g/^Filling/d
g/^Buffer/d
g/^Done/d
g/^Dhrystone/d
g/time [^ ]* /s///
g/^real/.-1,.j
g/^user/.-1,.j
g/^sys/.-1,.j
g/^This machine benchmarks at/.-1,.j
g/This machine benchmarks at/s///
g/real/s///
g/user/s///
g/sys/s///
g/   */s//	/g
1i
BENCHMARK	REAL	USER	SYS
---------	----	----	---
.
w
q
EOF
uname -a >$RPT
echo >>$RPT
QUEST="MANUF MODEL CPU CLOCK RAM DISK FPA"
echo "Please answer $QUEST questions below."
echo "e.g. MANUF: IBM;   MODEL: PC/AT;     CPU: 80286;   CLOCK: 6Mhz;"
echo "     RAM: 2MB;     DISK: 20MB CMI;   FPA: 80287"
for i in $QUEST
do
	echo "$i:	\c" | tee /dev/tty >>$RPT
	read a
	echo "$a" >>$RPT
done
echo >>$RPT
newform -i40,50,60,70 <$TMP >>$RPT
echo >>$RPT
date >>$RPT
rm $TMP
