2 # common_subscriber given a set of Debian mailing lists, show the common subscribers
3 # and is released under the terms of the GNU GPL version 3, or any
4 # later version, at your option. See the file README and COPYING for
6 # Copyright 2014 by Don Armstrong <don@donarmstrong.com>.
17 common_subscriber - given a set of Debian mailing lists, show the common subscribers
21 common_subscriber [options]
24 --debug, -d debugging level (Default 0)
25 --help, -h display this help
26 --man, -m display manual
34 Debug verbosity. (Default 0)
38 Display brief usage information.
57 my %options = (debug => 0,
63 'debug|d+','help|h|?','man|m');
65 pod2usage() if $options{help};
66 pod2usage({verbose=>2}) if $options{man};
68 $DEBUG = $options{debug};
72 push @USAGE_ERRORS,"You must give some mailing lists";
75 pod2usage(join("\n",@USAGE_ERRORS)) if @USAGE_ERRORS;
81 for my $list (@ARGV) {
82 my $fh = IO::File->new('/var/list/'.$list.'/dist','r') or
83 die "Unable to open /var/list/$list/dist for reading: $!";
91 for my $subscriber (sort keys %subscribers) {
92 print $subscriber."\n" if $subscribers{$subscriber} eq scalar @ARGV;