What's cooking (2010/01 #03)
[git/dscho.git] / ProjectContact
blobdadd48699e6ace550190f812e3c905289bcc7748
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 info@lwn.net LWN.NET
58 ask@perl.org Perl5-porters at perl
59 EOF