procmail
[Top] [All Lists]

Re^2: VARIABLE=result of sed?

1997-07-14 16:42:00
era eriksson <era(_at_)iki(_dot_)fi> wrote:

era> This is not doing what you expect. This is a mixture of two different
era> ways to do things. (I'd expect you'll find a strangely named folder
era> whose name starts with "HEAD=" somewhere in your mail directory ;^)

How did you know?:-)
There were several unique-named-files as such.

era>   A procmailrc file, seen on a high level of abstraction, consists of
era> assignments and recipes. Here, you have mixed assignment syntax into a
era> recipe. Not good. 
era> 
era> Correct alternative (1): just do an assignment.
era> 
era>   General form:
era>     VAR=value
era> 
era>     HEAD=`formail -X "" | sed -e 's/</\&lt;/g'`

This is same as my original. Could you re-state?

era> 
era> Correct alternative (2): a recipe with a slightly peculiar action
era> line. 
era> 
era>   General form:
era>     :0flags...
era>     [ * conditions ... ]
era>     [ VAR= ] | action
era> 
era>     :0hw
era>     HEAD= | formail -X "" | sed -e 's/</\&lt;/g'
era> 
era> By the way, the call to formail is unnecessary here, because you are
era> already feeding in only the headers (by way of the :h flag). Thus,
era> this should be a more efficient solution:
era> 
era>     :0hw
era>     HEAD= | sed -e 's/</\&lt;/g'

Thanks. Clouds are begining to move(not to fade though yet).

era> 
era> Philip's standard gripe about setting your PATH correctly instead of
era> defining a variable FORMAIL can be found in the archives ... :-)

I could not locate this article.
Could you give me search keywords?

_/_/_/      Mitsuru FURUKAWA      _/_/_/
_/_/_/        Tokyo, Japan        _/_/_/
_/_/_/     mailto:furu(_at_)009(_dot_)com    _/_/_/
_/_/_/  http://www.009.com/furu/  _/_/_/

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