#!/bin/sh # Copyright (C) 1995, Mats Kindahl. All rights reserved. # This program is in the public domain, you can redistribute # it and/or modify it as long as this copyright notice is # kept. # # This software is delivered as-is. There is NO WARRANTY, neither # implicit nor explicit, for this code. # # E-mail: matkin@docs.uu.se # # %W% # %Z%CGI to retrieve a manual and deliver it to WWW. MANPATH=/usr/sup/misc/man:/usr/sup/tex/man:/usr/lang/man\ :/usr/local/man:/usr/man:/usr/share/X11/man PATH=/usr/local/bin:/usr/bin name="WWW Manual Pager" # QUERY_STRING contains the manual, with an optional section after, # separated from the name with a space. get_man () { IFS=: for path in $MANPATH; do for m in $path/man?/$1.$2*; do if [ -r "$m" ]; then echo "
"
nroff -Tman -man $m 2>&1 | col -b
echo ""
return
fi
done
done
echo "