:
#!sh
# apropos
#
# sh script to search the /usr/lib/whatis data base associated with the
# on-line manual.  Secondarily search a second database if unsuccessful.
#
# In manual entry mention sh limitation of 9 strings: we do not use shift.
#
#
if [ $# -eq 0 ]; then
	echo 'Apropos searches manual database for relevant entries.'
	echo '\tUsage: apropos string [string [string [...]]]'
	echo 'where strings are regular expressions'
	exit 2
fi

echo '*** Apropos: Searching System Database.'
# For each entered keyword
for i
do
	egrep "$i" /usr/lib/whatis | more
	systat=$?
done

echo 'Return for NET Utility database.'
read nothing

echo '\n*** Apropos: Searching Net Server Database.'
# For each entered keyword
for i
do
	egrep "$i" /usr/lib/whatis.linux | more
	systat=$?
done

if [ $systat = 1 ]; then
	echo 'Nothing Apropriate Found.'
	exit 1
fi

exit 0


Return to Home Page
Return to Metayoga Page
Return to shell Page


The URL for this document is:
http://graham.main.nc.us/~bhammel/graham/SHELL/apropos.html
Created: 1997
Last Updated: May 28, 2000 Email me, Bill Hammel at
bhammel@graham.main.nc.us
READ WARNING BEFORE SENDING E-MAIL