
# HPUX_ID: @(#)29.1   86/07/04
#          @(#)whatis.sh	29.1      86/06/19
:
: whatis [-o] [name ...]
:

ROOT=/usr/contrib
BIN=${ROOT}/bin/graf
cd ${ROOT}/lib/graf/whatis

set - `$BIN/cvrtopt $@`

case $1 in
	-*o*) opflg=1; shift;;
esac

if test $# -le 0
then
	ls  | pr -l`ls  | wc -l | af "x/5" 2>/dev/null| ceil` -5 -t -w72
	sed -n -e "2,\$p" whatis | more
else
	for i in $*
	do if test -r $i
		then
			if test $opflg
				then
					echo "\n$i"
					cat < $i | sed -n "/^Option/,\$p" | more
					echo 
				else sed -n -e "2,\$p" $i | more
			fi
		else echo "\ndon't know what $i is"
		fi
	done
fi
