NetBSD/share/man/tools/prsynops

30 lines
509 B
Plaintext
Raw Normal View History

1992-07-13 20:18:25 +04:00
#! /bin/sh
1998-01-09 11:03:16 +03:00
#
# $NetBSD: prsynops,v 1.2 1998/01/09 08:05:12 perry Exp $
#
1992-07-13 20:18:25 +04:00
set x $*
. ./.param
for dir in $DIRLST
do
date > $TMPDIR/synops$dir
echo >> $TMPDIR/synops$dir
cd $MANDIR/man$dir
for file in $FILLST
do
so=`line < $file | sed "s/ .*//"`
if test "$so" = ".so"
then
continue
fi
nroff -man $file > $TMPDIR/tmp.$$
echo "$file:" >> $TMPDIR/synops$dir
ed - $TMPDIR/tmp.$$ >> $TMPDIR/synops$dir <<!
/SYNOPSIS/;+,/^ [A-Z][A-Z][A-Z][A-Z]/-p
q
!
done
done
rm -f $TMPDIR/tmp.$$