procmail
[Top] [All Lists]

procmail seems to insert newlines when taking STDOUT from |

1998-09-29 22:57:27

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

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

(the "cfile" is on the same line as the rest of TARGET)

this difference is quite noticeable when later on I try to deliver the
mail to $TARGET -- it works on the sparc1 it does not on the sparc4.

Could this possibly have something to do with the speed that this recipe
is executing? naaaaaaah.

Any ideas would be most apprciated.

**************************************************************
Carl Mason    
Director
UC Berkeley Demography Lab
Voice:(510) 642-1255   Fax:(510) 643-8558  http://demog.berkeley.edu/~carlm
*************************************************************


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