Xymon Mailing List Archive search

cleaner hobbit-confreport.sh output

list Scott Smith
Wed, 23 Nov 2005 13:24:03 -0500
Message-Id: <user-f74cec478de4@xymon.invalid>

Henrik,

I was looking at the configuration report, thinking that the output of the
process listing could be much cleaner. Being a shell guy and not a C guy, here's
a modified command line that will clean up the process output. Of course, an
even better solution would be to enclose the process listing in <pre>...</pre>
tags in the output from the hobbit-confreport.cgi program. But, this works.

exec /home/hobbit/server/bin/hobbit-confreport.cgi $CGI_HOBBITCONFREPORT_OPTS \
| /bin/sed 's#\(>procs<.*=top>\)\(.*\)\(<br>\)$#\1^M<hobbit>\2</hobbit>^M\3# ;
s#\\\\#~~#g ; s#\\n#<br>#g ; s#~~#\\\\#g' \
| /usr/bin/tr "^M" "\n" \
| /bin/sed 's#hobbit>#pre>#g'


--Scott