clearing the terminal screen

Barton E. Schaefer schaefer at ogccse.ogc.edu
Fri Dec 16 05:10:51 AEST 1988


In article <7007 at batcomputer.tn.cornell.edu> lynch at batcomputer.tn.cornell.edu
(Tim Lynch) writes:
} 
} 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.

Just a suspicion, but I bet the vt100 is slow enough that the TERMCAP
entry claims it needs padding (extra ascii NUL chars) in the escape
sequences.  "setenv CLEAR `clear`" inserts a NUL into $CLEAR.  But guess
what NUL is?  Yep, the string terminator.  So $CLEAR gets truncated.

Try using

    setenv CLEAR `clear | tr -d '\0'`

I'm not positive that will work, but it has a fighting chance. :-)

You might also try

    setenv CLEAR "`clear`"

I have discovered that for certain termcap entries, some collision
between the csh backquote mechanism and the termcap library causes
pieces of the termcap to be lost.  I have no idea why this happens.
Anybody out there have a clue?

-- 
Bart Schaefer		"You've heard of Load/Store architectures?  Well, the
			 80286 is a L-l-l-load/S-s-s-store architecture."
CSNET   (Has not changed)	schaefer at cse.ogc.edu
UUCP    (Should work now)	...{sun,tektronix,verdix}!ogccse!schaefer



More information about the Comp.unix.questions mailing list