Xymon Mailing List Archive search

scripting help

list Stef Coene
Thu, 6 Sep 2007 20:36:52 +0200
Message-Id: <user-46310dc64dd4@xymon.invalid>

On Thursday 06 September 2007, Jason Chambers wrote:
Just to clarify, I need to know a way to parse out the # part of blade:#
from bb-hosts.

I don't know if there is a scripting mailing list for hobbit exclusively,
and my scripting abilities is very basic, so any help would be awesome! :)
There is only one mailing list, this one.

bbhostshow will dump the bb-hosts file.  You can use perl or shell to parse 
the lines you need.  I prefer perl to parse text.  Somethine like:

./bbhostshow | perl -e 'while (<STDIN>) { if ( $_ =~ /blade:(.+) / ) { 
print "BLADE: $1\n\n" ; } } '

I love perl :)


Stef