if grep "^$1:" $A/LOGFILE
then
	ed - $A/LOGFILE <<!
		/^$1:/+;/-----/p
		/^$1:/;/-----/w /tmp/log$$
		/^$1:/;/-----/d
		w
!
	if test -s /tmp/log$$
	then
		echo "Solution:"
		( cat /tmp/log$$; echo "Solution: " `date`; $A/logcat; echo ========= ) >>$A/SOLUTION
		rm /tmp/log$$
	else
		echo SOLVE aborted
	fi
else
	echo Entry $1 not found
fi
