#!/bin/sh case `hostname` in cce) PATH=$PATH SPOOL=/home/edc/Mail/466 AWK=gawk ;; casas) PATH=$PATH:/usr/ucb SPOOL=/var/mail/elec466 AWK=nawk ;; *) PATH=$PATH:/usr/public/bin/sun4 SPOOL=/usr/spool/mail/elec466 AWK=gawk ;; esac # extract QUERY_STRING fields eval `echo ${PREFIX}${QUERY_STRING} | \ sed -e 's/'"'"'/%27/g' | \ ${AWK} 'BEGIN{RS="&";FS="="} ; \ $1~/^[a-zA-Z][a-zA-Z0-9_]*$/ { gsub("\n","",$2) ; \ printf("QS_%s=%c%s%c\n",$1,39,$2,39) }' ` case $QS_msg in '') cat <ELEC 466 Questions and Comments

Questions and Comments

You are invited to post questions or comments to this \`\`bulletin board.'' Post by sending mail to elec466@casas.ece.ubc.ca.
        From		      Subject
EOF
	frm -n -t $SPOOL | \
	${AWK} ' /^[ 0-9]+:/ { sub(":","  ") ; \
		print "  " $0 ; next } ; \
		{ print "   " $0 } '

cat <
You can also send questions or comments to:
Ed Casas / edc@ece.ubc.ca
EOF ;; *) cat <ELEC 466 Comments - Message $QS_msg
EOF

	readmsg -f $SPOOL "$QS_msg"

cat <
Reply by mail to elec466@casas.ece.ubc.ca. EOF ;; esac