Xymon Mailing List Archive search

Remove square brackets from Alerts

list Henrik Størner
Fri, 23 May 2008 10:38:06 +0200
Message-Id: <user-4b4ff9b197fb@xymon.invalid>

On Tue, May 20, 2008 at 11:45:02AM +1000, Allan Spencer wrote:
out that square brackets and a bunch of others are not supported so I  
need to know if I can remove them from the alert code or somehow  
generate the message in a way that it doesnt send them.
[snip]
and the smsalert.sh
echo "${BBALPHAMSG:0:160}" | gnokii --sendsms "$RCPT"
How about

 echo "${BBALPHAMSG:0:160}" | \
 sed -e 's!\[!(!' -e 's!\]!)!' \
 gnokii --sendsms "$RCPT"

to simply replace the square brackets with plain ones ?


Henrik