#!/bin/sh # GR people 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 GR People search output

Search Results

EOM # Unescape search string, extract first word. Further safety check. allpars=`$unescape "$QS_search"` export allpars allpars=`$safeit allpars` firstpar=`echo "$allpars"|awk '{print $1}'` export firstpar firstpar=`$safeit firstpar` # Now set search type. (regex or plain) # A single unknown will be interpreted as an ISINDEX search with # a plain search, case insensitive. case $QS_method in advanced) searcher=egrep ;; simple) searcher=fgrep ;; *) searcher=fgrep ;; esac case $QS_case in sensitive) sea="$searcher" ;; insensitive) sea="$searcher -i" ;; *) sea="$searcher -i" ;; esac #ok, do it $sea "$allpars" $emailfile |fgrep -v "ZZ"| awk -F\& -f /usr/local/http/GR/people.awk allpars="$allpars" cat <New Searches:

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 GRpeople Gateway

General Relativity E-mail Addresses

This is a simple interface into the General Relativity mailing address list. This service is provided by the UBC GR group, but the list itself is kept by Malcolm MacCallum. It performs searches on the list of e-mail addresses for people working in GR. Simply type a piece of text into the dialog box and GRpeople will then display any entry that has that particular string in any field. Case does not matter, and all available entries will be displayed, but only a single field will be matched.


Or go to:
GR Journal 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)
"