Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!apollo!rousseau From: rousseau@apollo.HP.COM (John Rousseau) Newsgroups: comp.sys.apollo Subject: Re: How can a script determine machine type & OS? Message-ID: <476e3eb9.20b6d@apollo.HP.COM> Date: 15 Dec 89 01:24:00 GMT Sender: root@apollo.HP.COM Organization: Hewlett-Packard Apollo Division - Chelmsford, MA Lines: 27 To: abair@turbinia.oakhill.uucp In-Reply-To: Cc: Bcc: In article you write: >We are developing gnumake files to use on all of the machines >we have to support, so we need a way to determine the machine >type and OS. For the Sun, we grep the first line of /etc/motd, Well, the command /usr/apollo/bin/bldt will give you a wealth of interesting information. Although it qualifies as an Aegis command, it is one of our commands that is meant to be used in any environ. % bldt **** Node 29C15.E582 **** "//ferrari" Domain/OS kernel(7), revision 10.2, October 13, 1989 12:51:22 pm Some creative grep'ing and awk'ing will snarf out the info you want. the 'kernel(7)' part refers to the sau type. If you want the actual node type, use /etc/nodestat -l . -John -------------------------------------------------------------------------- John Rousseau Internet: rousseau@apollo.hp.com Apollo Division UUCP: {mit-eddie,yale,uw-beaver}!apollo!rousseau Hewlett-Packard Phone: (508) 256-6600 Chelmsford, MA 01824 Fax: (508) 250-0361 Disclaimer: (you know the words, sing along if you like) --------------------------------------------------------------------------