#!/bin/sh echo Content-type: text/plain echo if [ x"$QUERY_STRING" != x ] then ITEM_NAME=`echo "$QUERY_STRING"| sed '/search=/s/.*search=\([^&]*\).*/\1/'| /u/faculty/dick/bin/urlunencode| tr -d '& '` case x"$ITEM_NAME" in x) echo Please supply the name of an item in echo my bibliography like: Botting97 ;; xhelp) echo "You need to supply the name of an item in my bibliography." echo "Use the search engine at http://www.csci.csusb.edu/cgi-bin/dick/lookup to find these." ;; xsubjects) echo "A list of subjects can be found at" echo " http://www.csci.csusb.edu/dick/samples/subjects.html" ;; *) spoof=dick echo QUERY_STRING="$QUERY_STRING", ITEM_NAME="$ITEM_NAME", "REMOTE_ADDR=$REMOTE_ADDR" HTTP_REFERER="$HTTP_REFERER", bib|mail -s bib $spoof@csci.csusb.edu echo "Item $ITEM_NAME" sed -n "/^\. $ITEM_NAME[^a-zA-Z0-9]*$/,/^\.Close\.Set/p" /home/u/faculty/dick/newbib.mth echo "--------------------" ;; esac else echo No QUERY_STRING fi