#!/bin/sh
#
# bm2html -- convert chimera bookmark file to HTML
#
# Anthony_Starks@Merck.Com
#
AWK=nawk
PROG=`basename $0`
echo "<html><title>Chimera Bookmark</title>"
echo "<h1>Nice Places to Visit</h1>"
echo "<em>(updated on `date`)</em><p><ul>"

sort +1 $* | uniq | $AWK '
{
        printf "<li><a href=%s>", $1
        for (i=2; i <= NF-1; i++)
                printf "%s ", $i
        printf "%s</a>\n", $NF
}
END { "print </ul></html>" }'

echo "<p><em>Generated by $PROG, on behalf of ${USER}@`hostname`</em>"
