#!/bin/sh

echo "Content-type: text/html"
echo ""
if [ ! "$1" ] || [ ! -f "$1" ]; then
	echo "Usage: $0 FILANAME"
	exit 1
fi
source="$1"
listtype="ul"

echo "<${listtype}>"
sort "$source" | awk -F \| '{ printf "  <li>%s <a href=\"mailto:%s\">&lt;%s&gt;</a> %s\n", $1, $2, $2, $3 }'
echo "</${listtype}>"
