procmail
[Top] [All Lists]

Re: Has anyone written a procmail filter to remove vcards?

1998-05-12 08:55:52
# awk script to filter out vcard--
#anything between begin: to end: wont
#be printed.

BEGIN{
     flagb = 0
}
{
    x1 = substr($1,1,6)
    x2  = substr($1,1,4)
    if (x1 == "begin:")
    {    
         flagb = 1
     }
     if (flagb != 1)
     {  print $1
      }
     if (x2 == "end:")
     {
         flagb = 0
      }
END {}
-------------------
How to use this script:

:0:
YOUR USUAL CONDITION
| awk -F'\012' -f myscript |  normal destination


            
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com