[cvs] bogofilter/contrib randomtrain,1.2,1.3
David Relson
relson at osagesoftware.com
Sun Dec 8 19:23:21 CET 2002
At 01:04 PM 12/8/02, Matthias Andree wrote:
>relson at users.sourceforge.net writes:
>
> > - grep -b '^From ' $file | \
> > + grep -a -b '^From ' $file | \
> > awk "BEGIN {FS=\":\"} {print \"$indic $file \"\$1}" >>list.$pid
> > wc -c $file | awk "{print \"$indic $file \"\$1}" >>list.$pid
> > done
>
>Breaks Solaris. We need a different approach. I presume the binary tools
>that ship with commercial unices are not up to the tasks we expect
>them. They expect text, we feed binary, this must fail. I've had much
>"fun" with sed and head on Solaris already which is why I wrote
>tests/dumbhead.c -- I couldn't find a tool that would handle \0
>properly.
>
>I fear we now need a dumbgrep...
All it needs to do is read from a specified file, find the From lines, and
generate appropriate output. Sounds like 20 or 30 lines of code. Could
use lexer_fgets() which accepts NUL characters. Being dumb, it could
assume "^", i.e. only match lines if the search string is at the beginning
of the line.
More information about the bogofilter-dev
mailing list