From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1012a6,5120b503df4ed78f X-Google-Attributes: gid1012a6,public X-Google-Thread: 1164f8,5120b503df4ed78f X-Google-Attributes: gid1164f8,public X-Google-Thread: 1070f0,5120b503df4ed78f X-Google-Attributes: gid1070f0,public X-Google-Thread: 115614,5120b503df4ed78f X-Google-Attributes: gid115614,public X-Google-Thread: 11035d,5120b503df4ed78f X-Google-Attributes: gid11035d,public X-Google-Thread: 1020c6,5120b503df4ed78f X-Google-Attributes: gid1020c6,public X-Google-Thread: 10b612,5120b503df4ed78f X-Google-Attributes: gid10b612,public From: guy@netapp.com (Guy Harris) Subject: Re: Portable startup files question.. Date: 1995/05/22 Message-ID: <3pqsp5$b6o@nova.netapp.com>#1/1 X-Deja-AN: 103109060 distribution: inet references: <3pndb7$1670@rs18.hrz.th-darmstadt.de> <3pqfbf$ds0@elron2.elron.net> organization: Network Appliance Corporation newsgroups: comp.unix.solaris,comp.unix.ultrix,comp.unix.admin,comp.unix.shell,comp.unix.aix,comp.sys.sun.admin,comp.sys.dec Ido Sarig wrote: >No they don't. Use `uname -a` and a simple awk script to get the 3rd field >of the output, which is 4.x on SunOS and 5.x on Solaris. Use "uname -r" and *no* script, "awk" or otherwise, to get the version number of the OS, which is 4.x in SunOS 4.x (including 4.1.x, the OS component of Solaris 1.y) and 5.x in SunOS 5.x (the OS component of Solaris 2.x). "uname" can be told to print particular values; you're not obliged to get it to print all its values and use an "awk" or "sed" or whatever script to select one of them.