[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] How to remove test ( test column ) from all hosts in hobbit
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] How to remove test ( test column ) from all hosts in hobbit
- From: "Ralph Mitchell" <ralphmitchell (at) gmail.com>
- Date: Tue, 16 Oct 2007 15:18:16 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=AAQNHxtR2r1S+fvG6wQyjk40/94diM/WdgzNdVfjPY8=; b=D2YkIhnKKSRyGmcoT9WMHU74s8pEYf198re5h8p3ordaof7CkYoWYcN+TpLEiOBonNbOp54xHvetRjwMz7Hn0yzaNJ0nk8/6cDN2MZTp2YlYM7klpK+r4Gf6Qbr8xlkrEN5SmDXtJVbr8wZ5efHTQ3+IFGA5gb5VwoEzmytrd0I=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Brvt34qAKKkzt2Ej1r4/wNDHd6BbhiGn29zfrG1NpizUHV6UbCKhkX/Ji58/2Wfe5oV40/hbGuYq/rEWRwtJEqW0r5iS4ZoKXKdE0PiF07FWB3E9sXrtl0zEDWuFfDKbnooE7ZkPfF7o0jLwhY3v4ul5HWuBpHellhjBDZLTDbQ=
- References: <58EF0861D3A1A04182720B3A5231C7C201A6DCE9 (at) usplm205.amer.corp.eds.com> <C839170D12C1FA488B22101CF46F3D3CECC74A (at) sgt-xchange1.sgt-dom.com> <20071016195621.GB30898 (at) hswn.dk>
On 10/16/07, Henrik Stoerner <henrik (at) hswn.dk> wrote:
> On Tue, Oct 16, 2007 at 12:56:07PM -0400, Michael A. Price wrote:
> > I found the command to remove a test from a single host.
> >
> > ~/server/bin/bb 127.0.0.1 "drop HOSTNAME ftp"
> >
> > That works great, but I have 400+ hosts, so I have to do this for each
> > host.
> >
> > I was wondering if there was a command to remove the single test from
> > all the hosts???
>
> How about
>
> bbcmd bbhostgrep ftp | awk '{print $2}' | \
> while read H; do bb 127.0.0.1 "drop $H ftp"; done
>
> That should do it ...
Won't that only work for hosts that still have 'ftp' in the bb-hosts
file?? Instead of bbhostgrep, how about hobbitdboard??
~/server/bin/bb localhost "hobbitdboard test=ftp fields=hostname" | \
while read H
do
~/server/bin/bb localhost "drop $H ftp"
done
Ralph Mitchell