1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00
freebsd/share/man/tools/mgrep
Jeroen Ruigrok van der Werven 680a9c90e8 Our manual pages are no longer in /usr/man, but in /usr/share/man.
Also, add the default #!/bin/sh for shellscripts, as well as $FreeBSD$.
2001-02-06 12:45:29 +00:00

24 lines
452 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
MANDIR=/usr/share/man
TMPDIR=/usr/share/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