Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!cs.uiuc.edu!joshi From: joshi@cs.uiuc.edu (Anil Joshi) Newsgroups: comp.unix.questions Subject: Want to load a different .exrc file depeneding on the TERM Summary: How to find the TERM. Keywords: vi, shell, TERM, setenv Message-ID: <1991Jan22.224538.9351@cs.uiuc.edu> Date: 22 Jan 91 22:45:38 GMT Sender: news@cs.uiuc.edu (News Database (admin-Mike Schwager)) Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL Lines: 28 I have to do the following. I login to my UNIX host from two types of terminals op4x (which is Esprit Opus or some such junk) and some sun workstation (I do not know the exact model etc.) Now what I want to do is to redefine the keys in .exrc so that all the function keys, arrow keys and other keys work as they are labelled (which usually do not work ... without map). What I want to know is how can I get the shell variable TERM. When I login from Esprit, the variable has a value of "op4x" and on the sun it has "sun". I would like to extract this in .cshrc and copy the appropriate file to .exrc Can somebody give me a simple shell (csh) script (code fragment will do) to exatract this stuff? Thanks in advance. Anil Joshi (joshi@cs.uiuc.edu) -- "Whatever we wish ourselves to be, we have the power to make ourselves. If what we are now has been the result of our own past actions,then it certainly follows that whatever we wish to be in the future, can be produced by our own present actions. how to act." - Vivekananda, Late Nineteenth Century Indian Philosopher