procmail
[Top] [All Lists]

Re^2: copy subject content to body

1998-01-25 14:38:28
era eriksson <era(_at_)iki(_dot_)fi> wrote:

On Sun, 25 Jan 1998 13:16:40 +0200 (EET), I wrote:
    | sed -e "\$a\\${NL}SUBJECT>${SUBJECT}\\${NL}<SUBJECT\\${NL}"
<...>
<SNIP SNIP>
Note that this avoids spawning any shell at all (that's basically the
Ahem. Sorry. < and > are in SHELLMETAS -- I had been testing this with
a sed script which didn't contain the > and <.

So here's the version which doesn't spawn a shell:

   NL="
"
   SAVEDMETAS="$SHELLMETAS"
   SHELLMETAS=

   :0fh
   | sed -e "\$a\\${NL}SUBJECT>${SUBJECT}\\${NL}<SUBJECT\\${NL}"

   SHELLMETAS="$SAVEDMETAS"

<SNIP SNIP>

Thank you for the deep(?) recipe and comments.
It satisfied my curiosity and cleared some clouds.

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

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