Hi fellows,
I've a question about the bb option hobbitdboard. I am just converting a few scripts I've written for BB and I want of course incorporate the functionality that Hobbit has instead of digging through the log files. What I'm trying to do is to get a list on which servers a certain test is running. I do this by firing : ./bb 127.0.0.1 "hobbitdboard test=TEST"|awk -F\| '{print $1}' and get a list of all machines running TEST. But not only thes machines but also the ones that are running test or myTEST or TestNEW which I don't want to be displayed. So it seems that Hobbit is doing its search case insensitive. Is there a switch for this and for search only tests that match the whole word instead of a substring? Or do I have to replace the above statement with: ./bb 127.0.0.1 "hobbitdboard test=TEST"|grep -w "TEST|awk -F\| '{print $1}'
Regards Torsten
Torsten Richter wrote:
Hi fellows,
I've a question about the bb option hobbitdboard. I am just converting a few scripts I've written for BB and I want of course incorporate the functionality that Hobbit has instead of digging through the log files. What I'm trying to do is to get a list on which servers a certain test is running. I do this by firing : ./bb 127.0.0.1 "hobbitdboard test=TEST"|awk -F\| '{print $1}' and get a list of all machines running TEST. But not only thes machines but also the ones that are running test or myTEST or TestNEW which I don't want to be displayed. So it seems that Hobbit is doing its search case insensitive. Is there a switch for this and for search only tests that match the whole word instead of a substring?
./bb 127.0.0.1 "hobbitdboard test=^myTEST$ |awk -F\| '{print $1}'
Dominique UNIL - University of Lausanne
Torsten Richter wrote:
Hi fellows,
I've a question about the bb option hobbitdboard. I am just converting a few scripts I've written for BB and I want of course incorporate the functionality that Hobbit has instead of digging through the log files. What I'm trying to do is to get a list on which servers a certain test is running. I do this by firing : ./bb 127.0.0.1 "hobbitdboard test=TEST"|awk -F\| '{print $1}' and get a list of all machines running TEST. But not only thes machines but also the ones that are running test or myTEST or TestNEW which I don't want to be displayed. So it seems that Hobbit is doing its search case insensitive. Is there a switch for this and for search only tests that match the whole word instead of a substring?
./bb 127.0.0.1 "hobbitdboard test=^myTEST$ |awk -F\| '{print $1}'
Also, you don't need to use awk to filter on certain fields, you can just use the hobbitdboard fields= option.
./bb 127.0.0.1 "hobbitdboard test=^myTEST$ fields=hostname,testname"
~Steve
On Mon, Apr 23, 2007 at 01:38:41PM +0200, Torsten Richter wrote:
What I'm trying to do is to get a list on which servers a certain test is running. I do this by firing : ./bb 127.0.0.1 "hobbitdboard test=TEST"|awk -F\| '{print $1}' and get a list of all machines running TEST. But not only thes machines but also the ones that are running test or myTEST or TestNEW which I don't want to be displayed.
The "test=..." is used as a regular expression. So to get only those that have the exact TEST status, use
./bb 127.0.0.1 'hobbitdboard test=(?-i)^TEST$ fields=hostname'
The "(?-i)" makes the match case-sensitive, and the "^...$" anchors it.
Regards, Henrik
participants (4)
-
bb4@richter-it.net
-
Dominique.Frise@unil.ch
-
henrik@hswn.dk
-
s_aiello@comcast.net