Ed Ravin | 1 Jun 2006 20:10
Picon
Favicon

[rancid] Re: Run a command in all the routers

On Thu, Jun 01, 2006 at 10:44:25AM -0700, Dylan Vanderhoof wrote:
> 
>    find . -name router.db |xargs cat |grep up| sed s/:.*:up//g

That might not work at some sites.  How about this:

    find . -name router.db | xargs cat | grep -w up | cut -f1 -d:

Which would avoid accidentally trying to reach routers with names
like "Frupton" that weren't in the "up" state, and be a little more
reliable parsing out the router name.

   -- Ed (but all bets are off if one of your routers is named "up")
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss


Gmane