cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1684
Views
5
Helpful
7
Replies
lmcruzmir
Beginner

tclsh is working in a different way between releases?

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
Beginner

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
Hall of Fame 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
Beginner

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


Sent from Cisco Technical Support Android App

lmcruzmir
Beginner

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 :-/

Joe Clarke
Hall of Fame Cisco Employee

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.

Content for Community-Ad