Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!unmvax!grumpy.cs.unm.edu!collins From: collins@grumpy.cs.unm.edu (Bill Collins) Newsgroups: comp.unix.ultrix Subject: Re: Determining machine architecture and ULTRIX version Message-ID: <435@unmvax.unm.edu> Date: 24 Oct 89 18:38:20 GMT References: <253@pvi.UUCP> <2785@decuac.DEC.COM> Sender: news@unmvax.unm.edu Reply-To: collins@grumpy.cs.unm.edu () Distribution: usa Organization: University of New Mexico at Albuquerque Lines: 38 In article <2785@decuac.DEC.COM> avolio@decuac.dec.com writes: >You can use the command "machine". > >Returns "mips" or "vax". > Ok, I run machine on a DECstation and get: mips This is, I guess, another way of saying decstaion. Now, on a vax it gives: machine: Command not found. Ok, I get it, "Command not found." is another way of saying VAX. :-) Oh, thats ok, the sun has them in command form. % sun returns true. % vax returns false. % mips returns: mips: Command not found. Gee, I wish it were somewhat standard. I end up using the /usr/lib/cpp and feeding it a list of defines(vax, mips, sun, ibm, etc) to do this. And with a little tweaking, you can get it to return some sort of message like: % whatami Says mips, Its little endian, Probably a DECstation. % Bill collins@turing.cs.unm.edu collins@unmvax.unm.edu gatech!unmvax!collins ------------------- Have you been bussed today?