News flash: the following two commands are equivalent:
mboxiter foo bar
formail -s sh -c "sed 1d | foo bar"
Don't I feel silly? :)
Description
---------------------------------------------------------------
mboxiter is designed to iteratively execute a program over each
RFC822 message in a standard unix mbox, feeding the message to
the standard input of the sub-program.
Installation
---------------------------------------------------------------
To build and install, simply execute:
make
make install
Test with:
make test
It should return 0 (success).
Broken pipe errors are okay.
Usage
---------------------------------------------------------------
mboxiter program [program_args] < mbox
mboxiter reads a standard unix mbox on standard input,
and for each RFC822 message in it, executes 'program'
along with the specified arguments, feeding the
RFC822 message to the sub-program's standard input.
mboxiter will exit success (0) unless it encounters a system
call error which is not associated with writing to the standard
input of the sub-program (because these can just be ignorable
pipe errors).
---------------------------------------------------------------
Copyright (C) 2002 Frank J. Tobin, ftobin@neverending.org
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.