What's cooking (2013/10 #05)
[alt-git.git] / ProjectContact
blob156101c399def65115b4d0406b189f8ce0ea257f
1 #!/bin/sh
3 header=
4 while :
5 do
6 case $# in 0) break ;; esac
7 case "$1" in
8 -b) header=Bcc ;;
9 -c) header=Cc ;;
10 -*) echo >&2 "Unknown option $1"
11 exit 1 ;;
12 *) break ;;
13 esac
14 shift
15 done
17 case $# in
18 0) match='*' ;;
19 1) match="*$1*"; shift ;;
20 esac
21 for p
23 match="$match|*$p*"
24 done
27 iis=
28 iis2=',
30 while read address name
32 case "$address" in
33 '#'*) continue ;;
34 esac
35 case "$name" in
36 $match) ;;
37 *) continue ;;
38 esac
39 item="$name <$address>"
40 if test -z "$header"
41 then
42 echo "$iis$item"
43 elif test -z "$iis"
44 then
45 printf "$header: $item"
46 iis="$iis2"
47 else
48 printf "$iis$item"
50 done
51 if test -n "$header"
52 then
53 printf '\n'
55 } <<\EOF
56 linux-kernel@vger.kernel.org Linux Kernel
57 ask@perl.org Perl5-porters at perl
58 EOF