Mitsuru Furukawa <furu(_at_)009(_dot_)com> writes:
I want to extract header part and sed it and put into $HEAD.
So I wrote:
:0hc
HEAD=`$FORMAIL -X "" |sed -e 's/</\</g'`
The log shows sed is working as expected, but $HEAD is empty.
So, I tried following recipe.
:0hc
HEAD=|$FORMAIL -X "" |sed -e 's/</\</g'
$HEAD
It seems to be working, but I don't feel comfortable:-<
Please tell me the right way.
Or is it a right way?
An action that looks like
variable=|some command here
is indeed the correct way to do it. The procmailrc(5) manpage mentions
this in its description of the '|' action. I'm assuming the "$HEAD"
on a line by itself is a typo, as procmail will just ignore this. Indeed,
your logfile should mention so.
Also, the 'c' flag is not needed on this recipe. If it was, what would be
the purpose of a variable capture recipe without it?
Philip Guenther