No empty .Rs/.Re
[netbsd-mini2440.git] / share / man / tools / mgrep
blob57dbc541880945d26df6cbd3e1b86d7749895672
1 MANDIR=/usr/man
2 TMPDIR=/usr/man/tmp
4 date > $TMPDIR/greps
5 echo "Grep list:  $*" >> $TMPDIR/greps
6 echo >> $TMPDIR/greps
8 for pattern in $*
9 do
10         echo "\n================" >> $TMPDIR/greps
11         echo "$pattern:" >> $TMPDIR/greps
12         for dir in 1 2 3 4 5 6 7 8
13         do
14                 cd $MANDIR/man$dir
15                 echo "cat <<'EOF' >---------------" >> $TMPDIR/greps
16                 echo "Section $dir" >> $TMPDIR/greps
17                 grep $pattern *.* >> $TMPDIR/greps
18         done
19 done