procmail
[Top] [All Lists]

RE: cat foo | bar > foo (RE: Round Robin for email using Procmail)

2000-06-29 22:46:19
From: Bart Schaefer [mailto:schaefer(_at_)zanshin(_dot_)com]

Copy-then-rewrite is no better for races than rewrite-then-rename. You
just get different failure behavior.

Yes.

(Sometimes, though, in scripts, I'm recycling one temp file, and
am too obstinate to change the script to use two temp files so
that I can do something fancy, so I just use "|sort -m -o" at
the end to write new output back to the same file.)


Incidentally, with respect to the sed command itself, I think
I'd prefer that the round robin list have one address per line,
rather than having one long line with addresses separated by
commas.  Easier for editing, wouldn't you say?

I agree, yes.


This moves the first line to the end:

      sed -n -e 1x -e 2,\$p -e \$x -e \$p

Or if you have a modern sed,

      sed -n '1x;2,$p;$x;$p'

Nice!  I'll file that away. . . .

--
Dallman Ross <dman(_at_)nomotek(_dot_)com>
U.S. Voicemail/FAX: +1 (415) 680-2388
Residence Telephone: +49 (0) 6122 / 98 04 46
Cellular Telephone: +49 (0) 177 / 515 34 69
Fight Spam! Join CAUCE! == http://www.cauce.org/ or
http://www.euro.cauce.org/
N.B.: For no auto-reply, use <mailto:dman+noacks(_at_)nomotek(_dot_)com>



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>