09-14-2015 06:11 PM
Right now my output only gives the first router-id, any idea how I would print 2 or more router-ids?
Solved! Go to Solution.
09-15-2015 12:04 AM
You can iterate over the lines:
foreach line [split $_cli_result "\n"] {
set _ospf_neighbors [regexp { Neighbor ([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)} "$line" match 1st_8et 2nd_8et 3rd_8et 4th_8et]
...
}
09-15-2015 12:04 AM
You can iterate over the lines:
foreach line [split $_cli_result "\n"] {
set _ospf_neighbors [regexp { Neighbor ([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)} "$line" match 1st_8et 2nd_8et 3rd_8et 4th_8et]
...
}
09-15-2015 08:31 AM
Thank you very much Joseph, you are the MVP for TCL. Just started using it, been poking around the forums here for some example seems like you always point people in the right direction.
My question is any documentation you would recommend ?
09-15-2015 11:53 PM
I recommend any general Tcl site (like tcl.tk) or book to learn the language. We use standard Tcl 8.3.4, so getting a solid foundation in Tcl will help. Besides the Cisco.com docs on "EEM Tcl" that you can find with Google, have a look at https://supportforums.cisco.com/document/48891/cisco-eem-best-practices . That will provide much more insight into the capabilities of EEM.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide