procmail
[Top] [All Lists]

Re: Removing list footers -- and sed case insensitivity

2004-12-23 04:11:03
Toen wij Justin Gombos kietelden, kwam er dit uit:
Ruud H.G. van Tol:

   :0
   * ^X-BeenThere: procmail(_at_)lists\(_dot_)RWTH-Aachen\(_dot_)DE$
   * B ?? ^[  ]*^_+^.*^.*^.*/procmail$^^
   * -6^0
   *  1^1  B ?? ^.*$
   | sed $=q

That one is tricky.. $= has special meaning to both sed and procmail,
but since it's not enclosed in single quotes, procmail interprets it
first to substitute for the score.  At first it appeared to be telling
sed to count all lines in the stream, and then print them all.

Yes, my goal was the shortest possible sed-expression.

Adaptive version:

  :0
  * ^X-BeenThere: procmail(_at_)lists\(_dot_)RWTH-Aachen\(_dot_)DE$
  *       B     ?? ()\/^[  ]*^_+^.*^.*^.*/procmail$^^
  * -1^1  MATCH ?? ^.*$
  *  1^1  B     ?? ^.*$
  | sed $=q

-- 
Grtz, Ruud


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail