clearing the terminal screen

Tim Lynch lynch at batcomputer.tn.cornell.edu
Thu Dec 15 07:19:17 AEST 1988


I'm having a problem setting an environmental variable to speed up
screen clearing. If I'm working from a hp terminal the following works:

  % setenv CLEAR `clear`
  % echo $CLEAR            # (and the screen is cleared)

But, if I'm working from a vt100, issuing echo $CLEAR does nothing.
Furthermore, echo $CLEAR | wc shows that CLEAR is of length zero.
The terminfo for the vt100 appears ok because I can issue:

  % clear

and the vt100 screen clears!  Actually, I don't have to change terminals;
if I have TERM set to hp, then CLEAR is set to the correct escape sequence
to clear the screen, whereas if TERM is set to vt100, CLEAR is not set
to anything.  I've tried this on two different Unix machines.

Anybody have a clue as to why I can't set CLEAR when TERM is equal to
vt100?



More information about the Comp.unix.questions mailing list