Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing the screen

Status
Not open for further replies.

kalmanTRF

MIS
Feb 13, 2003
12
0
0
US
Not sure if many people wrestle with this problem, but I generate scripts every now and would like to utilize a clear screen at time.

Well this is what I came up with: use the "send" command with some escape characters.

send {line-number | * | aux number | console number | tty number | vty number}

I use the "who" to find what line I am on (denoted by the * in the first column) and use that line number.

Now the escape sequence would be ^[[H^[[J

when you do it though you have to do a ^v first so you would actually type: (just to clarify: the ^ is the control key)

^v^[[H^v^[[J

This is what everything will look like when on the screen:

Switch#who
Line User Host(s) Idle Location
* 1 vty 0 idle 00:00:00 windecs1.mis.dkc.com

Interface User Mode Idle Peer Address

Switch#send 1
Enter message, end with CTRL/Z; abort with CTRL/C:
^[[H^[[J^Z
Send message? [confirm]
Switch#

a clear screen will follow. Remember the ^[ is actually preceded by a ^v, but that won't display.

Looks tough to do, but I use it for scripts and thus is not too complex.

If anyone has another or better way I would be curious to see how you do it.

Just thought that I would share this, since i have used many of the suggestions in this group.
 
i use ^c, but from procomm. i find, aspect scripts much more user frindly, script record has saved me hours of key strokes

john poole
bellsouth business
columbia,sc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top