-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jewel wrote: > I am trying to write a script which will email me a list of all the > lists and their members.
The script below will only output a count of list members (that's what the |wc -l does). > I was able to find the following below but keep getting errors when > I try and execute it. What are the errors? > I have made the file executable. You'd also need to include a #!/path/to/your/shell at the top, probably #!/bin/sh in this case. > for i in `/usr/local/mailman/bin/list_lists -b`; > do > j=`/usr/local/mailman/bin/list_members $i |wc -l` ^^^^^^ Remove the |wc -l if you want to get the list members. With the -l option, wc will simply print the number of lines in the output it's given. I think this is more like what you're asking for: #!/bin/sh for list in `/usr/local/mailman/bin/list_lists -b`; do echo "$list members:" /usr/local/mailman/bin/list_members "$list" echo done You could also create a separate email for each list which might make it easier to keep track of once it reached your mailbox. There are probably some scripts like this in the FAQ, and there are surely some in the list archives. Jon Carnes posted some way back, IIRC. - -- Todd OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp ====================================================================== Everyone needs to believe in something. I believe I'll have another beer. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (GNU/Linux) Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl. iG0EARECAC0FAkSppAcmGGh0dHA6Ly93d3cucG9ib3guY29tL350bXovcGdwL3Rt ei5hc2MACgkQuv+09NZUB1plGACeOnGm0E3XF49YbTJKRWX0eSGkG38An3fXl4BC tl8gXskTEe+/EjPVdbLJ =qO/Q -----END PGP SIGNATURE----- ------------------------------------------------------ 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