Hi Flo,
On Thu, Mar 17, 2011 at 5:24 PM, Florian Effenberger
<[email protected]> wrote:
> Christian Lohmaier wrote on 2011-03-17 15.51:
>>
>> Would it possible to modify that script (which one) [...]
>
> it is a *REAL* ugly hack. Have a look at my homedir in bilbo,
> floeff-mlmmjstat.sh. Feel free to hack it. It's still not in cron, I invoke
> it manually at the moment.
:-)
Then please replace your ugly hack with this:
for list in /var/spool/mlmmj/*/* ; do
echo $list/$(mlmmj-list -L $list -s -c)/$(mlmmj-list -L $list
-d -c)/$(mlmmj-list -L $list -n -c);
done 2>/dev/null | awk -F / '
BEGIN { print "Find below the mailing list statistics for '$(date -I)'"
print "This e-mail has been automatically generated
without human interaction."
printf "%40s %8s %8s %8s %8s\n", "Listaddress",
"Normal", "Digest", "Nomail", "Total"
print
"----------------------------------------+--------+--------+--------+--------"
normal=0; digest=0; nomail=0 }
{ printf "%40s %8d %8d %8d %8d\n", $6"@"$5, $7, $8, $9, $7+$8+$9
normal+=$7; digest+=$8; nomail+=$9 }
END { print
"----------------------------------------+--------+--------+--------+--------"
printf "%40s %8d %8d %8d %8d\n", "All lists", normal,
digest, nomail, normal+digest+nomail}'
(in case you're curious: 2>/dev/null just because there is some
spurious "discus" file in /var/spool/mlmmj/sv.libreoffice.org - it
contains a number only, probably created by a bad script? - the output
doesn't hurt when piping stdout to the mail only, but it "pollutes"
console output otherwise :-)
ciao
Christian
--
E-mail to [email protected] for instructions on how to
unsubscribe
List archives are available at
http://listarchives.documentfoundation.org/www/moderators/
All messages you send to this list will be publicly archived and cannot be
deleted