procmail
[Top] [All Lists]

Re: can't parse BIG file??

1997-01-31 07:07:21
"Ricky" == Ricky Roque <ricky(_at_)dynanet(_dot_)ad(_dot_)jp> writes:

    Ricky> Hi, I am trying to parse a daily report consisting of about
    Ricky> 1.5M of text file. I have the following recipe.

# Parse news daily run output 
:0 * ^Subject:.*news daily run output 
* ^From: System Administrator <root(_at_)dn004(_dot_)dnsa(_dot_)or(_dot_)jp> 
* !^X-Loop: ricky(_at_)dnsa(_dot_)or(_dot_)jp
{ 
:0 bfcw 
| head -20

You need an `i' flag on this recipe. The `head -20' command reads (and
writes) the first 20 lines and then exits. At that moment, procmail
hasn't had the chance to write the complete 1.5MB through the pipe.
Therefore, it thinks there is something wrong and tries to undo the
result of the filter.

If you add the `i' flag, procmail will ignore this error and proceed
normally with only the first 20 lines.

-- 
Guy Geens <guy(_dot_)geens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be>
Home Page: (to be announced)
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver) 

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