On 24 Jul, tris(_at_)semireal(_dot_)net(_dot_)dhis(_dot_)org wrote:
|
| Is there a better way to get a COUNT variable in procmail:
|
|
| :0 i W: count.lock
| {
| COUNT = `echo 0\`cat .count\`+1|bc|tee .newcount; \
| mv -f .newcount .count`
|
| }
|
|
Yes.
:0
* $ ${COUNT:-0}^0
* 1^0
{ COUNT=$= }
increments $COUNT, or sets it equal to 1 if not previously assigned.
--
/"\
Don Hammond \ / ASCII Ribbon Campaign
Raleigh, NC US X Against HTML Mail,
/ \ and News Too
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail