#!/bin/ksh
# @(#) fing.ksh 1.0 96/06/24
# 96/06/24 john h. dubois iii
print -r -- \
"Content-type: text/html

<body>
<pre>"
if [[ "$1" = *@* ]]; then 
    print -r -- "Can only finger local users."
elif [[ "$1" = -* ]]; then
    # Do not allow options.
    print -r -- "No such user."
else
    # -u: Use 3.2v4 finger if name is not a user name
    /usr/bin/finger -u "$1"
fi
print -r -- \
"</pre>
</body>"
