[hobbit] Remove square brackets from Alerts

Henrik Stoerner henrik at hswn.dk
Fri May 23 10:38:06 CEST 2008


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




More information about the Xymon mailing list