Hello; I've modified the following script in order to get monthly statistics including list owner column.
original script: --------------------- #!/bin/bash MONTH=`date +'%b'` MAILMANDIR=/cwis/htdocs/mailman POSTLOG=$MAILMANDIR/logs/post LISTLISTS=$MAILMANDIR/bin/list_lists LISTMEMBERS=$MAILMANDIR/bin/list_members echo "Listname Posts Members" echo "=========================" for list in `$LISTLISTS | grep -v "matching mailing lists found" | awk '{print $1}'` do postnum=`grep "^$MONTH" $POSTLOG | grep -i "post to $list" | wc -l` membernum=`$LISTMEMBERS $list | wc -l` echo $list " | " $postnum " | " $membernum done -------------- (it works perfectly) I've added owner related lines and the script became to be as following: modified script: #!/bin/bash MONTH=`date +'%b'` MAILMANDIR=/cwis/htdocs/mailman POSTLOG=$MAILMANDIR/logs/post LISTLISTS=$MAILMANDIR/bin/list_lists LISTMEMBERS=$MAILMANDIR/bin/list_members LISTOWNERS=$MAILMANDIR/bin/list_owners echo "Listname Posts Members" echo "=========================" for list in `$LISTLISTS | grep -v "matching mailing lists found" | awk '{print $1}'` do ownlist=`$LISTOWNERS $list | head -1` postnum=`grep "^$MONTH" $POSTLOG | grep -i "post to $list" | wc -l` membernum=`$LISTMEMBERS $list | wc -l` echo $list " | " $ownlist " | " $postnum " | " $membernum done ------------- only addition is the path of "list_owners" command and ownlist variable calling this command. But the script gives the following lines. " Traceback (most recent call last): File "/cwis/htdocs/mailman/bin/list_owners", line 120, in ? main() File "/cwis/htdocs/mailman/bin/list_owners", line 91, in main mlist = MailList(listname, lock=0) File "/cwis/htdocs/mailman/Mailman/MailList.py", line 130, in __init__ self.Load() File "/cwis/htdocs/mailman/Mailman/MailList.py", line 615, in Load raise Errors.MMUnknownListError Mailman.Errors.MMUnknownListError " The is about ~250 lists in the system and the result probably will be repeated 250 times if i wont kill the command. how can i solve the problem? Tank you for your answers. Regads. Evrim AKMAN Computer Center METU ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp