procmail
[Top] [All Lists]

Re: Round Robin for email using Procmail

2000-06-27 15:57:42
From: Lee Howard <faxguy(_at_)server(_dot_)deanox(_dot_)com>

| cat rrobinlist | sed 's/^\([^,]*\),\(.*\)/\2,\1/' > rrobinlist

Aside from the fact that this won't work (rrobinlist will be empty
afterward), it looks like YAUUCA (yet another UUCA).  One way to update
a file that is used both for input and output, though (if one really
wants to do this sort of thing), is via sort.

        sed 's/foo/bar/' < file | sort -m -o file

It's an old trick.  The -m keeps the original sort order, i.e.,
doesn't sort anything.  You're just relying on sort's ability to
overwrite the same input file to output.

-- 
    \     .-.     .-.     .-.     .-.     .-.     .-.     .-.     /
     \-d-/-m-\-a-/-n-\-(_at_)-/-n-\-e-/-t-\-c-/-o-\-m-/-.-\-c-/-o-\-m-/
      '-'     '-'     '-'     '-'     '-'     '-'     '-'     '-'

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