cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
802
Views
5
Helpful
2
Replies

TCL question

persepolis77
Level 1
Level 1

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!!!

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

This should work:

proc get_net { interface } {

return [join [lrange [split [lindex [exec "sh ip int brief $interface | include $interface"] 1] "."] 0 2] "."]

}

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.