How do *you* identify terminals?

crp at ccivax.UUCP crp at ccivax.UUCP
Fri Feb 24 01:21:33 AEST 1984


On System 3 and System 5, the Bourne Shell looks in
/etc/profile before $HOME/.profile. We use /etc/profile
to set $TERM (by looking in /etc/ttytype for the terminal)
Where /etc/profile looks like:

TERM=`tty | sed 's,/dev/,,'`
TERM=`grep $TERM /etc/ttytype`

if [ "$TERM". = . ] ; then
	TERM=dumb
else
	TERM=`echo $TERM | sed 's, .*,,'`
fi
export TERM

and /etc/ttytype looks like:

h19 tty00
vt100 tty01


				Chuck Privitera 
				Computer Consoles Inc.
				Rochester, NY



More information about the Comp.unix.wizards mailing list