|Thu 98-04-02 Ralph SOBEK <sobek(_at_)irit(_dot_)fr> list.procmail
| want to save certain HTML URLs only the first time I encounter them.
| ...whether the $GREP succeeds or fails, the recipe
| succeeds!
| :0 B ()\/http://.* !Go to: http://www.rootsweb.com
| * !http://www.k2nesoft.com/~fred$ !from Juno at http://www.juno.com {
| html = $MATCH
| }
|
| :0 Ahb *$ ! ? $GREP -s "$html" $MAILDIR/save-html {
| LOG = "Web match = $MATCH ========================="
|
| :0: save-html
| }
I'd like write it a bit differently. See at the end.
This terminal here is awful, I couldn't see what the marked character
[!] were. (I'm in our lab), but I assume you meant ORing. Take your pick.
the GREP recipe should be okay. What if you tried alternative
recipe
result = `$GREP -s "$html" $MAILDIR/save-html`
:0
* ! result ?? $\html
{
...it didn't exist
}
What does shell(csh) say if you run
% $GREP -s "$html" $MAILDIR/save-html
% echo $status
And what is your procmail version?
jari
:0 B
* ()\/http://.* [!]Go to: http://www.rootsweb.com
* ! http://www.k2nesoft.com/~fred$ [!]from Juno at http://www.juno.com
{
html = $MATCH
:0
*$ ! ? $GREP -s "$html" $MAILDIR/save-html
{
LOG = "Web match = $MATCH ========================="
:0: save-html
}
}