BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} Fix: problem with mailing acks with more than one word
On Fri, 2006-03-24 at 21:36, Russ Starr wrote:
> I noticed that when I replied to bb e-mail messages that my MSG only
> displays the first word I entered. Looking through bin/bb-mailack.sh,
> I see that $MESSAGE is found by using:
>
> MESSAGE=`$CAT $FILESUBJ | $GREP -i "MSG=" | $SED
> 's/^.*[Mm][Ss][Gg]=\(.*\)$/\1/' | $SED 's/[ ]/+/g'
> 2>/dev/null`
>
> This will switch any spaces with +'s. When you later pass the
> $MESSAGE to bin/bb, it doesn't like the +'s and only keeps the first
> word. For example:
>
> ./bb 192.168.1.1 "ack ack_event 1234567 30 Russ+is+fixing+it"
>
> This will not work as intended and the message will only keep "Russ".
> (as indicated by bbvar/acks/acklog) I played around with it a bit and
> if you do this:
>
> ./bb 192.168.1.1 "ack ack_event 1234567 30 Russ is fixing it"
>
> it will work just fine. To fix it, I simply took out the last sed
> command on the MESSAGE= line above so that my line reads:
>
> MESSAGE=`$CAT $FILESUBJ | $GREP -i "MSG=" | $SED
> 's/^.*[Mm][Ss][Gg]=\(.*\)$/\1/' 2>/dev/null`
>
> My info:
>
> BB 1.9i on OpenBSD 3.8
That's odd. The routine "bb_doack" in the file bbpage.c contains the
line:
replacestr(message,sizeof(message),"+"," ");
So, the plus characters are at least expected. I also had a quick look
at the source for "bb" and I couldn't see anything that would cause it
to have a problem with the plus characters.
I'll keep digging.
Cheers, Phil.
--
Positive, adj.: Mistaken at the top of one's voice.
(Ambrose Bierce, "The Devil's Dictionary")
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index