Insert Responses to Command Prompts in Tclsh

I have been aware of the typeahead Tcl command for months, but somehow I never got it to work.

It works perfectly in IOS release 12.4(15)T; this is what you have to do to clear interface counters:

typeahead "y"
exec "clear counter dialer 0";

Warning: if the input is not consumed by the executed commands, it stays in the typeahead buffer; quite dangerous if you have a sequence of commands, as the wrong command could be acknowledged.

Add comment