File:  [CSRG BSD Unix] / 43BSDTahoe / man / tools / mgrep
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43tahoe
BSD 4.3tahoe

MANDIR=/usr/man
TMPDIR=/usr/man/tmp

date > $TMPDIR/greps
echo "Grep list:  $*" >> $TMPDIR/greps
echo >> $TMPDIR/greps

for pattern in $*
do
	echo "\n================" >> $TMPDIR/greps
	echo "$pattern:" >> $TMPDIR/greps
	for dir in 1 2 3 4 5 6 7 8
	do
		cd $MANDIR/man$dir
		echo "cat <<'EOF' >---------------" >> $TMPDIR/greps
		echo "Section $dir" >> $TMPDIR/greps
		grep $pattern *.* >> $TMPDIR/greps
	done
done

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.