[Mailman-Users] shell script to make consolidated list from other lists?
dennis.black at ualberta.ca
Thu Dec 4 23:43:53 CET 2003
>===== Original Message From John Dell <jdell at unr.edu> =====
>Anyone have a shell script that will make take members of some lists and use
>them to make a consolidated list?
>remove dupes(List A + List B + List C) = List D
>I'm sure it can be done with list_members, remove_members, and add_members,
>but I'm not very handy with shell scripts.
John, this works for me.
#Synch two smaller lists with a larger list.
#If more than two, adjust 'wk' numbers.
/home/mailman/bin/list_members the-a-list > /tmp/abc.wk1
/home/mailman/bin/list_members the-b-list >> /tmp/abc.wk1
cat /tmp/abc.wk1 | tr '[A-Z]' '[a-z]' > /tmp/abc.wk2
uniq -u /tmp/abc.wk2 > /tmp/abc.wk3
uniq -d /tmp/abc.wk2 >> /tmp/abc.wk3
sort -d /tmp/abc.wk3 > /tmp/abc.wk4
/home/mailman/bin/sync_members -w=no -f /tmp/abc.wk4 the-big-list
The '-w=no' means 'don't send the welcome message.'
Cron the above at your desired frequency.
More information about the Mailman-Users