home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!caen!umeecs!nova!ellis
- From: ellis@nova.gmi.edu (Stew Ellis)
- Subject: Re: How to clear screen in sh ?
- Message-ID: <ellis.722225357@nova>
- Sender: news@zip.eecs.umich.edu (Mr. News)
- Organization: GMI Engineering&Management Institute, Flint, MI
- References: <MENJAN.92Nov17214452@ra.cs.umb.edu> <gerald.722116730@gerald> <sherman.722143967@foster>
- Distribution: usa
- Date: Fri, 20 Nov 1992 02:09:17 GMT
- Lines: 43
-
- sherman@unx.sas.com (Chris Sherman) writes:
-
- >In <gerald.722116730@gerald> gerald@torolab4.vnet.ibm.com (Gerald Oskoboiny) writes:
-
- >>menjan@cs.umb.edu (Men-Jan Lin) writes:
-
- >>>echo '^L' does not work perfectly for me.
-
- >>Try "tput clear". (May be AIX-specific, I'm not sure).
-
- >Seems to work under HP/UX, SunOs (and solaris), SVR4 (NEC), dgux,
- >osf1 (alpha box), MIPS, and SCO.
-
- >But it didn't work on NeXT nor DEC.
-
- >Just in case anyone wanted to know...
- >--
- > ____/ / / __ / _ _/ ____/
- > / / / / / / / Chris Sherman
- > / ___ / _/ / /
- > _____/ __/ __/ __/ _\ _____/ _____/ sherman@unx.sas.com
-
- I may be missing something, but the various solutions offered so far all
- depend on the terminal being properly initialized. /bin/clear and tput
- clear both work through terminfo settings. Sometimes J. Random User gets on
- without terminal being set to anything better than network, even though she
- is sitting at a perfectly good ANSI or vt100 terminal. Most terminals which
- are not Ansi or vt100 seem to be ADM3a or Viewpoint or close and many of
- them understand the same alternate escape sequence. I simply do:
-
- echo ^[[H^[[2J^L
-
- (all of those have to be entered in a mode that allows quoting of real
- escape characters and real Control-L).
-
- This takes care of probably 90% of the installed base of terminals. Screw
- the rest ;).
-
- --
- -- ___________________
- R.Stewart(Stew) Ellis, Assoc.Prof., (Off)313-762-9765 / _____ ______
- Humanities & Social Science, GMI Eng.& Mgmt. Inst. / / / / / /
- Flint, MI 48504 ellis@nova.gmi.edu /________/ / / / /
-