[hobbit] scripting help

Stef Coene stef.coene at docum.org
Thu Sep 6 20:36:52 CEST 2007


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



More information about the Xymon mailing list