Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#144425 - 18/02/2003 20:52 Small help for shell users: "clear" command
TheAmigo
enthusiast

Registered: 14/09/2000
Posts: 363
I use a telnet window larger than 80x24 and vi on the empeg assumes 80x24. So everytime I leave vi, the cursor is left in the middle of the screen, and every time, I type clear and every time, it says "sh: clear: command not found".

Well, here's the solution. It looks like something from an IOCCC, but at least it's nice and small and gets the job done. The binary is attached, source is here:
main(){printf("^[[H^[[J");}

note that both sets of ^[ are really escape chars, not a carat followed by a bracket.


Attachments
142161-clear (198 downloads)

_________________________
--The Amigo

Top
#144426 - 19/02/2003 05:38 Re: Small help for shell users: "clear" command [Re: TheAmigo]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Press Ctrl+L?
_________________________
-- roger

Top