Re: procmailrc syntax

Patrick Shanahan <[email protected]> Fri, 28 Oct 2016 17:12:20 -0400
Newsgroups gmane.mail.procmail
Organization Ptilopteri in Pandemonium
Message-ID <[email protected]>
* Zhiliang Hu <[email protected]> [10-28-16 16:08]:
> Although I used procmail for so long I never figure out what kind of
> "script" rules it follows.  For example in one of my rc script I try to
> calculate a list file ("dist"):
> =

>   DISTCOUNT=3D`grep -cv '^(' dist` -1
> =

> the calculation part fails, end up in the log:
> =

>   procmail: Skipped "-1"
> =

> How can I get over this without getting it to external script for a simple
> calculation like this?

Definitely not a procmail syntax expert here, but...  I believe you are
have a problem with grep syntax rather than procmail.  The minus sign for
a grep parameter requires special handling.
-- =

(paka)Patrick Shanahan       Plainfield, Indiana, USA          @ptilopteri
http://en.opensuse.org    openSUSE Community Member    facebook/ptilopteri
http://wahoo.no-ip.org        Photo Album: http://wahoo.no-ip.org/gallery2
Registered Linux User #207535                    @ http://linuxcounter.net