[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] scripting help
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] scripting help
- From: Stef Coene <stef.coene (at) docum.org>
- Date: Thu, 6 Sep 2007 20:36:52 +0200
- References: <5FE94042A3B7764CA4E47D5F670889ED0994E88F (at) reddo.geosoft.com> <5FE94042A3B7764CA4E47D5F670889ED0994E890 (at) reddo.geosoft.com>
- User-agent: KMail/1.9.6 (enterprise 0.20070831.706792)
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