cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2098
Views
5
Helpful
7
Replies

tclsh is working in a different way between releases?

lmcruzmir
Level 1
Level 1

IOS: c7200p-advipservicesk9-mz.151-4.M3a.bin

(tcl)#set bla [ exec "sh run | i IO_Inet"]

! shows lines matching IO_Inet string

! also I am able to read the "bla" variable with puts correctly

IOS: c7200p-advipservicesk9-mz.152-4.S2.bin

(tcl)#set bla [ exec "sh run | i IO_Inet"]

(tcl)#puts $bla

Everything is empty!!

Can anyone here give a hand?

I am very close to cut my veins.

7 Replies 7

mstewart100
Level 1
Level 1

have you taken Tcl out of the equation to troubleshoot?

eg. just in normal enable prompt go

sh run | i IO_Inet

does that string exist in the running config for that ios version?

Joe Clarke
Cisco Employee
Cisco Employee

I was able to confirm this on another image.  It seems pipelines are not working correctly in tclsh.  If you can, convert your tclsh script to EEM Tcl and that should work.  Alternatively, omit the pipeline, grab all of the results, then post-process the output to extract the bits of interest.  I filed CSCue77173 to track this issue.

lmcruzmir
Level 1
Level 1

Yes ios prompt was working fine, config was the same in all cases


Sent from Cisco Technical Support Android App

lmcruzmir
Level 1
Level 1

I cant see the bug at bug toolkit


Sent from Cisco Technical Support Android App

It will take 24 hours or a little more for the bug to be security reviewed and cleared for visibility in bug toolkit.  If it does not show up by Monday we can ask for a manual review.

Mike

Ok, done, bug visible now.

Is there any expected time to fix it?

At least on my side several scripts are pending of that bug :-/

No ETA yet.  The bug was just assigned a developer.  As a workaround, you could use EEM instead of tclsh, or slightly change the code to be able to parse the output of the commands within Tcl itself.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: