procmail
[Top] [All Lists]

Re: Cannot Find sed in Recipe

1997-07-17 17:24:00
On Thu, 17 Jul 1997, David W. Tamkin wrote:

[...]
| > [I'm also curious about that pipe to egrep; you're specifying a search 
file
| > ("$USERLIST") on the command line but also feeding egrep some stdin?]
| 
| | sed -e "1,$/, /$NL/g" $USERLIST | egrep -is $WHOFROM $USERLIST
| [...]

egrep is going to ignore stdin, I'm sure, if you name a text file on its
command line, so pretty much sed is doing its work for nothing.

There is no temporary file; sed's output becomes egrep's input, which egrep
ignores because its command line tells it to read input from a file instead.

If you take the trailing "$USERLIST" out of egrep's command line arguments,
egrep will read sed's output from the pipe.

    Weeellll......  I took $USERLIST out of the pipeline, but it made no
difference.  Here is an excerpt from the log:

procmail: Executing "formail -XFrom: | formail -rtz -xTo:"
procmail: Assigning "WHOFROM=pobart(_at_)access(_dot_)digex(_dot_)net"
procmail: Assigning "MATCH="
procmail: Matched "Glosa List Test 22"
procmail: Match on "^Subject: *\/[^ ].*"
procmail: Assigning "THESUBJ=Glosa List Test 22"
procmail: Assigning "NL=
"
procmail: Executing " sed "s/, /\\$NL/g" $USERLIST | egrep -is $WHOFROM"
procmail: Assigning "LASTFOLDER= sed "s/, /\\$NL/g" $USERLIST | egrep -is 
$WHOFROM"
procmail: Notified comsat: "pobart@: sed "s/, /\\$NL/g" $USERLIST | egrep -is 
$WHOFROM"

    (By the way, I prefer the \\$NL format; it makes things a little
clearer to me.)

  It seems to me that neither sed nor egrep is getting executed.  I
don't get any notifcation of any kind, either.  Neither of the
subsequent :0a or :0E blocks gets executed.  Things sort of fall into
the bit bucket.

Thanks again.
Paul                             <pobart(_at_)access(_dot_)digex(_dot_)net>
----------------------------------------------------------
Paul O. Bartlett, P.O. Box 857, Vienna, VA 22183-0857, USA
Finger, keyserver, or WWW for PGP 2.6.2 public key
Home Page:  http://www.access.digex.net/~pobart

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