#!/bin/sh

# echo HTTP/1.0 200 OK
echo Content-type: text/html
echo Server: $SERVER_SOFTWARE
echo
echo \<html\>\<title\>search results \</title\>
echo \<body bgcolor="#EAEAAE" background=/MRSEC/Images/MRSEC.bkg.gif\>

/home/tten/public_html/cgi-bin/pubgrep $QUERY_STRING
head -100 /tmp/queryoutput | sed -e 's"^[^:]*Fac_pub.html:"<hr>"' | sed -e 's"^\(MRSEC[^:]*\):"<hr><a href=/\1>source document</a><br>"' | sed -e 's"$QUERY_STRING"<b>$QUERY_STRING</b>"g'
echo \</body\>\</html\>
#  done
