#!/bin/sh PASSWORD="FooBar" echo "Content-Type: application/xhtml+xml; charset=UTF-8" echo "" ASNO="" if printf %d "$1" &> /dev/null ; then ASNO=`printf %d "$1"` fi if [ $ASNO -le 0 ]; then ASNO=""; fi echo '' echo '' echo '' echo "
" echo "To see only routes originating from say AS 64645, append ?64645 to the URL
" IP4CMD="${PASSWORD}\nshow ip bgp\nquit\n" IP6CMD="${PASSWORD}\nshow ipv6 bgp\nquit\n" fi echo "" echo -e ${IP4CMD} \ | nc 127.0.0.1 2605 \ | sed -n '/BGP table/,/Total number/ p' echo "" echo "
" echo -e ${IP6CMD} \ | nc 127.0.0.1 2605 \ | sed -n '/BGP table/,/Total number/ p' echo "" echo "" echo ""