30048f7c05
Also, add the default #!/bin/sh for shellscripts, as well as $FreeBSD$.
24 lines
452 B
Bash
Executable File
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
|