lindex - am I doing something wrong?

  • 0
  • 1
  • Question
  • Updated 5 years ago
  • Answered
Create Date: Feb 15 2012 7:32PM

No matter how I try - it doesn't work:




set var cli.out 0

show port 12 info detail

set var txtOutput $tcl(split ${cli.out} "
")


set var VlanLine $TCL(lindex $txtOutput 10)

create log entry $VlanLine



It keeps giving me errors about $VlanLine .... what's wrong here?



Thanks,

(from Eugen_NAIMAN)
Photo of EtherNation User

EtherNation User, Employee

  • 20,340 Points 20k badge 2x thumb

Posted 5 years ago

  • 0
  • 1
Photo of EtherNation User

EtherNation User, Employee

  • 20,340 Points 20k badge 2x thumb
Create Date: Feb 16 2012 9:28AM

Hi,

this will work for you -> create log entry "$(VlanLine)"

--
Jarek

(from Jaroslaw_Kasjaniuk)
Photo of EtherNation User

EtherNation User, Employee

  • 20,340 Points 20k badge 2x thumb
Create Date: Feb 19 2012 1:57PM

Thanks jarek - that did work.

I guess I need to read a bit more about TCL.

(from Eugen_NAIMAN)

This conversation is no longer open for comments or replies.