summaryrefslogtreecommitdiff
path: root/contrib/utils/sendtoall
blob: f929f527248729ce9a031ba97b3b9c12009373ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Date: 13 Sep 1996 22:49:40 GMT
From: William Burrow <aa126@fan1.fan.nb.ca>
To: pine-info@cac.washington.edu
Subject: Re: Composing mail to all entries in addressbook

Ari Y. Weintraub (aweintra@umabnet.ab.umd.edu) wrote:
: Is there any way in Pine 3.94 to compose mail to all of the entries in my
: addressbook. For example, I recently changed my phone number and would
: like to send one message to everybody with the new number. I can't find a
: way to do this - does anyone out there have any idea? TIA

This would be a nice suggestion for Pine, however, you can do pretty much
the same in Unix using the following awk script.  Copy everything between the
lines into a file named:  everyone 

-------------%< clip --------------
{
    printf("everyone\tEveryone\t(");  
  
    if ( $0 ~ /\(/ )
        continue
    else
        printf("%s", $1);  

    while ( getline > 0 ) {
        if ( $0 ~ /\(/ )
            continue
        else
            printf(",%s", $1);
    }
    printf(")\n"); 
}
-------------%< clip --------------

Now, type the following exactly at the Unix prompt:

awk -f everyone < ~/.addressbook >> ~/.addressbook && echo Done.

You may wish to first copy your ~/.addressbook file to a backup file, 
before executing this command. 

If everything went well, it should say Done.  When you start Pine, there
should now be a list in your address book with the name:  everyone,
containing all of your address book nicknames (but NOT other lists). 


--
--
William Burrow  --  Fredericton Area Network