[comp.unix.wizards] TERM and TERMTYPE

phil@inetg1.Arco.Com (Phil Meyer) (02/20/91)

In article <22295@hydra.gatech.EDU>, gt2807a@prism.gatech.EDU (Benjamin H. Cowan) writes:
> 
>   I'd like to be able to set my PATH to different paths depending on the
> machine type I log into.  Is there a TERMTYPE shell variable?  If not,
> how might one go about figuring out which path to set depending on the
> machine type?  There are several programs compiled differently to run on
> different types of machines and I would like to be able to put the correct
> directories where the correct programs according to my machine type could 
> be found in my PATH.
> 

Here at ARCO, we use the new arch command found on some systems to play games
with the PATH variable.  For those systems without arch, we made one.  For
example, on our SGI machines, arch is a one liner:
echo sgi

Then the path can be set up in a .cshrc like this:

set ARCH = `arch`

set path = ( all_the_normal_stuff /share/bin/$ARCH )


Not too bad.  All of the executables for the different machine/CPU types are
in the /share/bin hiarchy.

-- 
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Phil Meyer         phil@arco.com  Work:(214) 754-6805                      |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+

richard@calvin.ee.cornell.edu (Richard Brittain - VOS hacker) (02/22/91)

In article <1991Feb19.181838.15460@Arco.COM> phil@Arco.com writes:
>In article <22295@hydra.gatech.EDU>, gt2807a@prism.gatech.EDU (Benjamin H. Cowan) writes:
>> 
>> machine type?  There are several programs compiled differently to run on
>> different types of machines and I would like to be able to put the correct
>> directories where the correct programs according to my machine type could 
>> be found in my PATH.
>> 
>
>Here at ARCO, we use the new arch command found on some systems to play games
>with the PATH variable.  For those systems without arch, we made one.  For
>example, on our SGI machines, arch is a one liner:
>echo sgi
>
Many systems already have a uname(1) command.  Uname -m gives the machine
type (VAX, MIPS, hcx, gcx on the set I have to play with), that you can
put into $HOSTTYPE and place in your $PATH or whatever.  Ultrix didn't
have uname(1) but it's only a 5-line program to call uname(2) and print out
the results.

-- 
Richard Brittain,                 School of Elect. Eng.,  Eng. and Theory Center
                                  Cornell university, Ithaca, NY 14853
INTERNET: richard@calvin.ee.cornell.edu	
    UUCP: {uunet,uw-beaver,rochester,cmcl2}!cornell!calvin!richard