Generating binary output from Tclsh

Unanswered Question
Jan 10th, 2008
User Badges:

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
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Joe Clarke Mon, 01/14/2008 - 22:48
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

Add this to your script:


exec "terminal international"


For example:


proc clearScreen { } {

exec "terminal international"

puts "\033\[2J"

exec "terminal no international"

}

Actions

This Discussion