mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
680a9c90e8
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
|