procmail
[Top] [All Lists]

Re: Filter question

1995-10-27 12:28:16
Soren answered Albert Koelmans

f Consider the pipe as a filter
{snip}
                                                                Does the
output of the action line get passed to the next recipe, even if the current
recipe is delivering?

     The current recipe is _not_ delivering.  it cannot be.  It
is a filter.

Or another way to say this ... one definition of a filter is a program
that takes standard input, does something to it, and puts the result on
standard output.  If you use the "f" flag, procmail is going to want to
feed the stdout of the filter into the next recipe.  If you use the "f"
flag with a recipe that delivers and has no stdout, then nothing will
happen after that because the next recipe won't get any input.

As Soren said, the "c" flag gives a COPY to the recipe and then proceeds
with what follows ... so if you want to deliver to one place AND continue
processing, "c" is what you want.

I have to admit, I was confused by the "f" man page section at first too, 
even though I knew what a filter was, until I realized it means consider 
it a filter that gets fed back into the next recipe.  So Hal, to your 
"go learn unix first" flame, I say Phhhhtphffffffff.

==================================================
| Andy Rowan                                     |
| Center for Remote Sensing and Spatial Analysis |
| Rutgers University, New Brunswick NJ USA       |
| e-mail: rowan(_at_)ocean(_dot_)rutgers(_dot_)edu                |
| WWW: http://deathstar.rutgers.edu/             |
==================================================

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