10-30-2007 11:05 AM
Hi,
In tclsh I have the following command:
proc get_net { interface } {return [join [lrange [split [lindex [exec sh ip int brief $interface
| include $interface] 1] .] 0 2] .]}
and I get this error message after applying to my router:
Router(tcl)#
proc get_net { interface } {return [join [lrange [split [lindex [exec sh ip int brief $interface
+>missing close-brace
In my template, the line is complete!!!
10-30-2007 11:32 AM
This should work:
proc get_net { interface } {
return [join [lrange [split [lindex [exec "sh ip int brief $interface | include $interface"] 1] "."] 0 2] "."]
}
10-31-2007 06:39 AM
It seems that there was a space somewhere which made me trouble.
I copied the same line from another template that I had and pasted in mine and worked.
so weired though!!!
Thanks anyway.
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