procmail
[Top] [All Lists]

"wc" in pipe not working!

1997-01-15 10:08:11
I need a little help here...

This works FINE in the shell, however in a procmail script, it doesn't... 
Why?  Anone have a clue?

The buggy line is the "wc" one, where it SHOULD return a line count...  In
the shell it does OK...  In the .rc file, it doesn't...  It returns a NULL
string.

BTW, names of the server and list have been altered here, since the list is
PRIVATE.

:0 c
* ^Subject:.*Welcome to the chat list
* ^From:(_dot_)*Request(_at_)xxx(_dot_)Com
| (     echo "Errors-To: Doctor(_at_)Netcom(_dot_)Com" ; \
        echo "Reply-To: Chat(_at_)xxx(_dot_)Com" ; \
        echo "X-Loop: Doctor(_at_)Netcom(_dot_)Com" ; \
        echo "X-List: Chat (Announcement)" ; \
        echo "To: Multiple Recipients of Chat List <Chat(_at_)xxxCom>" ; \
        echo "Subject: [Chat] Please welcome $TO2 to the list!" ; \
        echo "From: MReply List Server <Chat(_at_)xxx(_dot_)Com>" ; \
        echo "X-Commands-To: Request(_at_)xxx(_dot_)Com - commands in body" ; \
        echo "" ; \
        echo "Please welcome" ; \
        echo "$TO2" ; \
        echo "as a new member to our list!" ; \
        echo "" ; \
        /usr/bin/echo -n "There is a total of:" ; \
    ( /usr/ucb/wc -l ~/sr/sr-chat | cut -c1-8 ) ; \
        echo "current subscribers now on our list!" ; \
        ) \
        | msend -q $HOME/lists/chat

The ">>>"'d line is the buggy one, which DOES appear w/o the ">>>" in the
.rc file.

Like I said, it works FINE in the shell as-is (no ()'s though...addded those
last JIC, but it didn't alter it at all).

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