cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
276
Views
0
Helpful
1
Replies

Generating binary output from Tclsh

IVAN PEPELNJAK
Level 1
Level 1

I've tried to port a simple Tcl full-screen editor to IOS and failed completely as IOS tclsh escapes control characters written by the puts command. For example, the following escape sequence should clear the screen, but as the ESCAPE character is displayed as ^[, it doesn't work:

router(tcl)#puts "\033\[2J"

^[[2J

router(tcl)#

Any ideas how to persuade the router to display raw binary data?

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

Add this to your script:

exec "terminal international"

For example:

proc clearScreen { } {

exec "terminal international"

puts "\033\[2J"

exec "terminal no international"

}

Review Cisco Networking products for a $25 gift card