Experimental man utility
John Poplett
john at cstreet.uu.net
Fri Jul 6 16:16:30 AEST 1990
This is an experimental shell-script utility for maintenance of
"catman" pages. It scans the "catman" directories, i.e. the
directories containing formatted and expanded man pages, and
removes files that have fallen into disuse. Manclean.sh is
intended to be run periodically by cron. This version is wantonly
biased toward Xenix though it would be easy enough to convert it for
use with other man systems.
Comments, suggestions for improvements, bug notices are invited.
Please mail them to me directly.
John
----snip-----------snip-----------snip-----------snip-----------snip----
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: manclean.sh
# Wrapped by john at cstreet.UUCP on Thu Jul 5 23:03:56 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'manclean.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'manclean.sh'\"
else
echo shar: Extracting \"'manclean.sh'\" \(556 characters\)
sed "s/^X//" >'manclean.sh' <<'END_OF_FILE'
X#!/bin/sh
X#
X# @(#)manclean.sh -- remove not-recently-used files from catman
X# directories. Run from crontab a la uuclean, .etc. This version
X# for Xenix systems.
X#
X# $Id: manclean.sh,v 1.2 90/07/05 23:00:35 john Exp Locker: john $
X#
X
if [ -f /etc/default/man ]
then
X . /etc/default/man
fi
X
MANPATH=${MANPATH:=/usr/man}
X
cd $MANPATH
X
for directory in `find . -name 'cat*' -type d -print`
do
X cd $directory
X for file in `find . -type f -atime +10 -print`
X do
X rm -f $file
X done
X cd ..
done
X
du ${MANPATH} | mail -s "manclean ran; $MANPATH du" root
X
exit 0
END_OF_FILE
if test 556 -ne `wc -c <'manclean.sh'`; then
echo shar: \"'manclean.sh'\" unpacked with wrong size!
fi
# end of 'manclean.sh'
fi
echo shar: End of shell archive.
exit 0
--
John Poplett @ C Street Software | "Shutup", he explained.
312 Wolff St. Oxnard, Ca. 93033 USA | ~ Ring Lardner
(805) 486-7807 / uunet!cstreet!john |
More information about the Comp.unix.xenix
mailing list