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

Ed Ravin eravin at panix.com
Thu Jun 1 18:10:53 UTC 2006

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")

More information about the Rancid-discuss mailing list