procmail
[Top] [All Lists]

Re: procmail seems to insert newlines when taking STDOUT from |

1998-09-30 13:26:05

That is a nice way of commenting out the preceding newline -- I had not
thought of that.  As it turns out
Bill Houle <bhoule(_at_)sparc(_dot_)sandiegoca(_dot_)ncr(_dot_)com>

solved my problem by suggesting that it was due to different shells on the
two machines. Setting SHELL=/bin/csh  on the misbehaving machine solved
the problem.

Thanks.

On Wed, 30 Sep 1998, Philip Guenther wrote:

Carl Mason --- Director Demography Lab 
<carlm(_at_)demog(_dot_)berkeley(_dot_)edu> writes:
I'm using procmail  v3.11pre7 with sendmail 8.8.8 and solaris 2.6

A recipe such as 

:0Bc
* ^~Cfile:\/.*
MTCH=|(echo  $MATCH | sed "s/ //g")

TARGET= ${CALDIR}/$MTCH

results in the value of $MTCH getting what I believe is a preceding
newline which shows up when $MTCH gets used in a subsequent expression.
The log file shows this:

procmail: Assigning "MTCH="
procmail: Executing "echo  $MATCH | sed "s/ //g""
procmail: Assigning "TARGET=/opt/Ascribe/Calendar/Current/ 
cfile"

"cfile" is the correct value of $MTCH -- but for some reason it appears on
the following line

Now, the unnerving thing about this is that when I use this 
.procmailrc file on a sparc4, I get the above result -- AND it is seems to
happen whenever I get something out of a pipe.  BUT when I use this on a
sparc1 (running same version of procmail, sendmail, and solaris 2.6 
with the same patches) I get the behavior that I expect and prefer namely
...


Is it the same procmail binary (if you copy the binary from one to
the other, does it have the same behavior?)?  What does the log show
when you add the following to the rcfile?

LOG = "CALDIR = \"$CALDIR\"
MATCH = \"$MATCH\"
MTCH = \"$MTCH\"
"


Philip Guenther



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