procmail
[Top] [All Lists]

Filtering this list - sed usage

2004-07-30 17:46:38
I'm using the following (abridged) recipe for this list:

  MAILMAN_ML=(procmail\.lists\.RWTH-Aachen\.DE)

  YEAR=2004

  # Mailman and ezmlm lists
  #
  :0
  *$ ^List-Id:.*\/$MAILMAN_ML
  * MATCH ?? ()\/[^\.]+
  {
    LISTNAME=`echo $MATCH | tr '[:upper:]' '[:lower:]'`
    
    ## Nuke subject tag ##
    :0 fhw
    | sed -e "/^Subject:/ s/ *\[$LISTNAME\] */ /I"
  
    ## Nuke trailer ##
    :0 fbw
    * ^List-Id:.*procmail
    | sed -e '/^[ \t]*$/N \
              /^[ \t]*\n__*/N \
              /^[ \t]*\n__*[ \t]*\nprocmail.*org\//,/http.*procmail$/d'
  
    :0:
    mailing_lists/${LISTNAME:-phantom_list}_${YEAR:-0000}
  }

Notice the __* part of the regular expression.  I'm always running
into instances where _+ does not work.  The "+" metacharacter seems to
fail when sed is called from procmail.  

Has anyone noticed this?  I'm thinking this anomaly also occurs in
some unusual cases outside of procmail, but it's starting to annoy
me.  Maybe it's my imagination.

____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>