On Thu, Jul 23, 1998 at 02:09:13PM -0700, Christopher Adams wrote:
> Does anyone have a quick way to scan all lists and compute a total of
> subscribers on each list and/or a total of all subscribers to all lists.
> It sounds like a simple Perl script or such. Has anyone out there already
> done this?
This is something I tossed together a few years ago.
Note that I keep a file in my majordomo lists dir called
active.lists that contains the currently active lists on my
server (it excludes test lists, template lists and some other lists).
Since majordomo assumes that any file in the lists dir that
doesn't have a '.' in it is a list, you could generate your list
of lists on the fly if you wish.
#!/bin/sh
cd /majordomo
for list in `cat active.lists`
do
wc -l $list >> /tmp/list-count.tmp
done
cat /tmp/list-count.tmp
awk '{ s += $1 } END { print "Total listmembers: " s }'
/tmp/list-count.tmp
rm /tmp/list-count.tmp
References:
|
|