1 Jun 2006 20:10
[rancid] Re: Run a command in all the routers
Ed Ravin <eravin <at> panix.com>
2006-06-01 18:10:53 GMT
2006-06-01 18:10:53 GMT
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
RSS Feed