Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Generating binary output from Tclsh

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
Cisco Employee

Re: Generating binary output from Tclsh

Add this to your script:

exec "terminal international"

For example:

proc clearScreen { } {

exec "terminal international"

puts "\033\[2J"

exec "terminal no international"

}

116
Views
0
Helpful
1
Replies