Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!boulder!sunybcs!bingvaxu!leah!uwmcsd1!ig!jade!aurora!ames!ptsfa!ihnp4!homxb!hou2d!avr From: avr@hou2d.UUCP (Adam V. Reed) Newsgroups: comp.unix.wizards Subject: Re: Script for setting TERM type Message-ID: <1681@hou2d.UUCP> Date: Sat, 24-Oct-87 20:28:40 EST Article-I.D.: hou2d.1681 Posted: Sat Oct 24 20:28:40 1987 Date-Received: Tue, 27-Oct-87 01:24:18 EST References: <155@wa3wbu.UUCP> Organization: AT&T Bell Laboratories, Holmdel Lines: 38 Summary: Call it .profile In article <155@wa3wbu.UUCP>, john@wa3wbu.UUCP (John Gayman) writes: > > Im running Microport Sys V/AT on an AT-clone. Can anyone give me > a shell script for setting the Terminal type at login time. I use the > same login for myself but throughout the day use several terminal types. > Invaribly I forget to manually set TERM type and then VI, and well you > know the rest :-) > > I would like a small script to stick on the end of .profile that > would give me a one-line prompt at login time and ask me for my terminal > type. Preferably if nothing were entered it would default to vt100. > > I attempted to write my own script and everything looked like it > worked except the term type wouldnt actually get changed. Any ideas ? > > > John > The relevant script fragment is echo 'Terminal: \c' ; read TERM ; export TERM You can either put the above directly in your .profile, or put it in a file such as $HOME/termscript and add to your .profile the line . termscript This will cause it to be executed in your login shell. If you invoked your script with "$ termscript" instead of "$ . termscript" while testing, the script would be executed in a child shell, and your newly set $TERM would disappear when the child shell exited. In the future, please post your queries to "comp.unix.questions" and not "comp.unix.wizards", at least until you have a question that truly requires wizardly expertise. Adam Reed (hou2d!avr)