procmail
[Top] [All Lists]

Re: can't parse BIG file??

1997-01-30 07:25:34
At 10:36 AM 1/30/97 +0900, Ricky Roque wrote:
Hi,
I am trying to parse a daily report consisting of about 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

:0 A
| formail -A "X-Loop: ricky(_at_)dnsa(_dot_)or(_dot_)jp" | $SENDMAIL -oi -t
}      

It produces the following error.

procmail: Executing "head,-20"
procmail: Error while writing to "head"

[snip]

Do you have "head" on your system (not all UNIXes come with it)?
If so, is it in your PATH?

If you don't, try
        | awk 'NR<=20'
which should do the same thing (again, make sure awk is in
your PATH -- or give the full pathname to it).

Cheers,
Stan

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