On Mon, 2 Jun 1997 21:33:43 -0700 (PDT),
Dave/WebMaster <ddave(_at_)ddave(_dot_)com> wrote:
On Mon, 2 Jun 1997, era eriksson wrote:
On Sun, 1 Jun 1997 18:47:03 -0700 (PDT),
Dave/WebMaster <ddave(_at_)ddave(_dot_)com> wrote:
Presently, I'm using the recipe below to automatically add members to my
mailing lists. Problem is, I have no idea how to automatically remove
them if they send a remove request and have to manually do it. Any ideas
will be appreciated.
<...>
I think I see what you're saying. Using the same method to automatically
create a subscription file, I can create an unsubscribe file. Whey an
unsubscribe request comes in, use formail to strip the addy and write it
to a file. Then, use fgrep -xv to compare.
Yes. You could do a double fgrep / fgrep -v when reading the sub file:
:0
* ? fgrep -vx whatever unsubfile | fgrep -xf subfile
| ...
Or, fgrep -vx the unsubbed addy from the sub file, then copy the
resulting file back onto the original.
You need to use locks in order to not have two of these going on at
the same time, of course.
Fancier still: man comm or something.
Comm seems to be pretty simple. From what I gather, you would have to
sort the incoming addys. Can `sort' do this with a constantly changing file?
That's what makes it fancy .-)
And so you need to lock while sorting in order not to have a
constantly changing file.
(In fact the "fancy" part here is doing it harder than it has to be.
Sorting starts to make sense when you have lots of data.)
/* era */
--
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r. <http://www.iki.fi/~era/>
* Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>