#!/bin/sh

Usage() {
    echo Usage: $0 [-m] string-to-look-for
    echo "      where -m will find only manual page access point"
    exit 1
}

if test $# -gt 2 -o $# -lt 1
then
    Usage
fi

mflag=''
case $1 in
    -m) mflag='true'
	shift
        ;;
    -*) Usage
        ;;
esac

if test "$mflag" = ""
then
    ROOT="../help"
else
    if test "$1" = "" 
    then
        Usage
    fi
    ROOT="../help/17.manual/Help.pages"
fi

find $ROOT -type f -print | xargs grep -l "$1" | sed -e 's:../help/::'
