David W. Tamkin scrawled:
| > * 1^1 .
| > * 1^1 ^.*$
| > * -1^0 ($)^^
Dallman responded,
| Okay, David, point taken. but yours here isn't quite right
| either. I've experimented some, but can't quite get it.
"Isn't quite right" and "can't quite get it" are too vague:
what happens instead? The first condition counts the non-newline
characters, the second counts the whole lines (and thus gets a count
of the newlines), and the third undoes the error in the second where,
if the search area ends in a real newline, it and the putative closing
newline get counted as an extra line.
I realize. (All for only the body without the HB flags.) But
the count doesn't match the value of wc or ls for the message as
an individual file, when I insert the HB flags. Or as-is, when I
delete the header and run the result through wc, it's still not
an exact match:
$ sed '1,/^$/d' foobar | wc -c
977
$ harness foobar | grep Assigning
procmail: Assigning "TOT=975"
procmail: Assigning "LASTFOLDER=/dev/null"
("harness" is my test harness for procmail.)
Seems to me that we used to count characters, real newlines
included but putative newlines excluded, this way,
* 1^1 > 1
Nice, indeed! But the count is still off:
$ wc -c foobar
1936 foobar
$ harness foobar | grep Assigning
procmail: Assigning "TOT=1952"
procmail: Assigning "LASTFOLDER=/dev/null"
or if you're Fred Morris,
* -1^-1 < -1
Heh.
,sknahT
namllaD
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail