birdc scripting

Matthew Whittaker-Williams matthew at news-service.com
Thu Feb 10 15:16:41 CET 2011


On Thursday, February 10, 2011 03:11:32 pm Stephen Holmes wrote:
> If you call birdc inside a script like so:
> 
> /usr/bin/printf "show protocols all\nquit\n" | /usr/local/sbin/birdc |
> /bin/grep -A4 BGP  | /bin/egrep "^R|Routes"
> 
> it doesn't appear paginate.
> 
> This is how I collect the per peer prefix counts.
> 
> -Stephen


I gathered as much from mikhail`s answer:

echo 'show route' | birdc

I must say this is a much eleganter solution than collecting routes from an 
quagga router ;)


Thanks

Matt

-- 
News-Service.com - European Usenet Provider
Luttenbergweg 4, 1101 EC Amsterdam
P.O BOX: 12026 1100 AA, Netherlands
http://www.news-service.com  +31(0)20 398 1111



More information about the Bird-users mailing list