head	1.2;
access;
symbols
	man_1_1:1.1.1.1
	man:1.1.1;
locks; strict;
comment	@# @;


1.2
date	97.07.13.14.16.53;	author peter;	state dead;
branches;
next	1.1;

1.1
date	93.07.07.23.07.01;	author jkh;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	93.07.07.23.07.02;	author jkh;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	95.12.30.18.42.23;	author peter;	state dead;
branches;
next	;


desc
@@


1.2
log
@kill the undead
@
text
@#!/bin/sh
#
# whatis -- search the whatis database for keywords.  Like apropos,
#           but match only commands (as whole words).
#
# Copyright (c) 1990, 1991, John W. Eaton.
#
# You may distribute under the terms of the GNU General Public
# License as specified in the README file that comes with the man
# distribution.  
#
# John W. Eaton
# jwe@@che.utexas.edu
# Department of Chemical Engineering
# The University of Texas at Austin
# Austin, Texas  78712

PATH=/usr/local/bin:/bin:/usr/ucb:/usr/bin

libdir=/etc

if [ $# = 0 ]
then
    echo "usage: `basename $0` name ..."
    exit 1
fi

manpath=`/usr/bin/manpath -q | tr : '\040'`

if [ "$manpath" = "" ]
then
    echo "whatis: manpath is null"
    exit 1
fi

if [ "$PAGER" = "" ]
then
    PAGER="/usr/gnu/bin/less -sC"
fi

while [ $1 ]
do
    found=0
    for d in $manpath /usr/lib
    do
        if [ -f $d/whatis ]
        then
            grep -iw "^$1" $d/whatis
            status=$?
            if [ "$status" = "0" ]
            then
                found=1
                export found;
            fi
        fi
    done

    if [ "$found" = "0" ]
    then
        echo "$1: nothing appropriate"
    fi

    shift
done | $PAGER

exit
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Newer new man page reader.
@
text
@@


1.1.1.2
log
@recording cvs-1.6 file death
@
text
@@
