procmail
[Top] [All Lists]

Re: How to let procmail use mre memory?

2010-01-30 18:00:20
Hello,

Am 2010-01-30 17:41:05, schrieb JW Simpson:
    TMPVAR1=`mimedecode |grep --max-count=1 "^URL: " |sed 's|^URL: ||' ; :`

It is needed because I NEED the URL for wget

    TMPVAR2=`echo "${TMPVAR1}" |sed 's|.*an_pk/||' |tr -d ' ' ; :`

It has only a Number of the DOC and is needed in the rewriting of the
mail subject

    TMPVAR3=`wget --user-agent="tdtools-procmail v${TDTP_VERSION}" --quiet 
-O - ${TMPVAR1} ; :`

TMPVAR3 is needed if TMPVAR5 is empty

      TMPVAR4=`echo -e "${TMPVAR3}" |grep 'pdfserv' |head -n1 |sed 
's|.*http://pdfserv|http://pdfserv|' |sed 's|\.pdf.*|.pdf|' ; :`

It hold the URL to the PDF which is needed in the rewriting of the mail

      TMPVAR5=`echo -e "${TMPVAR3}" |sed -n '/APPLICATION NOTE /,$p' 
|sed 's|.*APPLICATION 
NOTE&nbsp;|<html><head></head><body><table><tr><td>APPLICATION NOTE |' ; :`
        TMPVAR5=`echo -e "${TMPVAR3}" |sed -n '/REFERENCE DESIGN&nbsp;/,$p' 
|sed 's|.*REFERENCE 
DESIGN&nbsp;|<html><head></head><body><table><tr><td>REFERENCE DESIGN |' ; 
:`

Two different versions which must be evaluated fro the original HTML page
if "APPLICATION NOTE" does not match, try "REFEENCE DESIGN"

The first error occur, after "APPLICATION NOTE" in "test"

Thoswe VARS can not cleared...

      TMPVAR9=`echo -e "${TMPVAR5}" |sed '/<!-- BEGIN: EE-MAIL -->/,//d' ; 
:`

OK, I can use TMPVAR5 instead of TMPVAR9

        TMPVAR9="${TMPVAR9}${NL}</table></body></html>"
      TMPVAR9=`echo "${TMPVAR9}" |html2text -width 72 -nobs -style pretty ; 
:`

This does not mather, since it is the same vriable and it is needed for
the rewriting of the message

You need to be freeing up these variables as you go ...

You have not understand what it does...

To free the variable just name it on a line by itself.

Which does only work FOR ONE LINE

    TMPVAR9=`echo -e "${TMPVAR5}" |sed '/<!-- BEGIN: EE-MAIL -->/,//d' ; :`
to
    TMPVAR5=`echo -e "${TMPVAR5}" |sed '/<!-- BEGIN: EE-MAIL -->/,//d' ; :`

but for this it is already to late because the error occur several lines
above...

You might also want to consider using an external program for the
parsing.

HOT POSSIBEL!!!!!!!!!!!!!!!!!!!!!!!

I have already writte it.  It is a backup server whre I can not have ANY
ECECUTABLES in my ${HOME}.

I can have only my ~/.procmailrc, some INCLUDERC and the logfiles

<snip>

I do not code AWK and it would not work for me since I  must  check  the
return value whether it is emty or not and if not-empty, work on  it  on
two lines TMPVAR5=...  and insert the return value into the message...

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/>                 Michelle Konzack
<http://www.can4linux.org/>                   Apt. 917
<http://www.flexray4linux.org/>               50, rue de Soultz
Jabber linux4michelle(_at_)jabber(_dot_)ccc(_dot_)de           67100 
Strabourg/France
IRC    #Debian (irc.icq.com)                  Tel. DE: +49 177 9351947
ICQ    #328449886                             Tel. FR: +33  6  61925193
____________________________________________________________
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>