home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / shell / 4797 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.2 KB  |  56 lines

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