Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!uwm.edu!linac!pacific.mps.ohio-state.edu!verber From: verber@pacific.mps.ohio-state.edu (Mark Verber) Newsgroups: comp.unix.admin Subject: Re: what kind of machine am I Message-ID: Date: 8 May 91 14:06:34 GMT References: <858@lhdsy1.chevron.com> Sender: news@pacific.mps.ohio-state.edu Distribution: na Organization: Ohio State University; Physics Department Lines: 19 In-reply-to: dlm@lhdsy1.chevron.com's message of 7 May 91 18:47:31 GMT SunOS and various other flavors of UNIX have the 'arch' command. A simple solution is to add a version of 'arch' for platforms that don't have it. For example, I have added /bin/arch to my DECstations that says simply: #!/bin/sh echo "pmax" exit 0 Ohio State Univ. Computer Science Dept has a file called /etc/sysinfo that had useful bits of information such are archtype, kernel's name, derivation of the OS, how to get the hostname, etc. We had a shell script that would parse this file and set appropriate environment variables. An example of a /etc/sysinfo: sun4:/vmunix:bsd4.2:sunos4.1:/bin/hostname cheers, mark