#!/bin/sh # GR journal finder. (c) Steve Braham # #.. To support an ISINDEX type search, set search string if given # an argument on the command line # emailfile="/usr/local/lib/addresses/grpersons" safeit="/usr/local/http/support/safeitgr" unescape="/usr/local/http/support/unescape" if [ $# -gt 0 ]; then PREFIX="search=" fi # #.. Check that a query has been made # if [ $QUERY_STRING ]; then # #.. Strip the variables out from the query string, # and assign them into the environment, prefixed by 'QS_' # # o sed removes any ' that would upset quoted assignment # # o awk ensures that # - all variables passed have legal names # - special characters are not interpreted by sh # # First a security strip search SAFE_QUERY=`$safeit QUERY_STRING` eval `echo $PREFIX$SAFE_QUERY | sed -e 's/'"'"'/%27/g' |awk ' BEGIN{RS="&";FS="="; seclist = ""} $1~/^[a-zA-Z][a-zA-Z0-9_]*$/ { printf "QS_%s=%c%s%c\n",$1,39,$2,39}' ` # #.. Output header # cat << EOM Content-type: text/html
"
print "Can attempt"
print "people or"
print "address"
print "search for "fword"."}
}' fword="$firstpar" sstring="$allpars"
cat <
GR People
GR Journal
GR Address
EOE
else
#
#.. The script was called without a query.
# Provide an ISINDEX type response for browsers
# without form support.
#
cat << EOM
Content-type: text/html
General Relativity E-mail Addresses For Journals and Groups
Or go to:
GR People
GR Address
HyperSpace
EOM
fi
echo "
"
ls -l $emailfile|awk '{
print "E-mail database last modified on "$5" "$6" "$7"."}'
echo "In case of problems, contact:
The Web Master (theoryweb@physics.ubc.ca)
software written by
Steve Braham (braham@physics.ubc.ca)"