#!/bin/sh # poor-man - Decklin Foster # This is too perverse for me to copyright, so it's in the public domain. SECTIONS="[1-8]" test "$#" = 2 && { SECTIONS="$1"; shift; } test -z "$MANPATH" && MANPATH="/usr/share/man/man* /usr/X11R6/man/man*" matches=`find $MANPATH -name "$1.$SECTIONS*.gz"` test -z "$matches" && { echo "man: no matches for '$1'"; exit 1; } for match in $matches; do cd `dirname $match`/.. zcat $match |\ perl -pe 's/^\.so (.*)/`zcat $1.gz`/e' |\ groff -t -mandoc -man -T${MANFMT:-latin1} - 2>/dev/null |\ ${PAGER:-more} done