#!/bin/sh # blah blah blah do not forget the comments by punishment of death NAME=`echo $QUERY_STRING | sed -n 's/^.*name=\([^&]*\).*$/\1/p'` OPTION=`echo $QUERY_STRING | sed -n 's/^.*nocase=\([^&]*\).*$/\1/p'` if [ $OPTION ] then PARAM="-i" fi echo "Content-type: text/html" echo echo "" echo "

Address Book Results

" if [ $NAME ] then echo "
    " grep $PARAM $NAME db.txt | sed 's/^/
  1. /' | sed 's/$/<\/li>/' echo "
" else echo "

Enter a name please sucker

" fi echo "

You entered $QUERY_STRING

" echo "

Name = $NAME

" echo "

Option = $OPTION

" echo "

Back to the menu

" echo ""