Re: Issues with formal and cut?

LuKreme <[email protected]> Tue, 13 May 2014 23:13:10 -0600
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
On 12 May 2014, at 12:20 , LuKreme <[email protected]> wrote:

> I have this line at the start of my .procmailrc
> 
> SMSTEXT=`/usr/local/bin/formail -I "" | /usr/bin/cut -c1,140`
> LOG="SMSTEXT: ${SMSTEXT}$NL”

that should be cut -c1-140.

However, I am still getting unexpected results later on when I try to sent the 140 characters as an SMS:

   :0c
      | (formail -b -I"Subject: SMS" \
        -I"To: ${SMS}" \
        -I"From: ${LUSER}"; \
        echo $SMSTEXT) | $SENDMAIL -t

instead of getting the SMS text, I get the whole message. I suspect that flags for formail are incorrect, but it’s been so long since I used it.

-- 
There's no such thing as too much chocolate.