Skip to content

Instantly share code, notes, and snippets.

@remoteur
Created April 18, 2015 16:53
Show Gist options
  • Save remoteur/390d7f8024a1193c718e to your computer and use it in GitHub Desktop.
Save remoteur/390d7f8024a1193c718e to your computer and use it in GitHub Desktop.
BGP Route
#!/usr/bin/expect
set rs routeserver.sunrise.ch
set expstr RS_AS6730
spawn telnet $rs
set route [lindex $argv 0]
expect -re "$expstr"
send "show ip bgp $route"
send -- "\r"
expect -re "$expstr"
send -- "exit\r"
expect eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment