1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
.\"
.\" cook - file construction tool
.\" Copyright (C) 1990, 1991, 1992, 1993, 1994, 1997 Peter Miller;
.\" All rights reserved.
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
.\"
.\" MANIFEST: User Guide, Built-In Functions, Operating_System
.\"
.H 2 "operating_system"
This function requires zero or more arguments.
The resulting wordlist contains the values of various attributes of
the operating system, as named in the arguments.
If no attributes are named, "system" is assumed.
Below is a list of attributes:
.VL 1i
.LI node
The name of the computer
.B cook
is presently running on.
.LI system
The name of the operating system
.B cook
is presently being run under.
For example:
if you were running on SunOS 4.1.3,
this would return "\f(CWSunOS\fP".
.LI release
The specific release of operating system, within name,
.B cook
is presently being run under.
For example:
if you were running on SunOS 4.1.3,
this would return "\f(CW4.1.3\fP".
.LI version
Version information.
For SunOS 4.1.3, this would return the kernel build number,
for other systems it is often the kernel patch release number.
.LI machine
The name of the hardware
.B cook
is presently running on.
For example:
If you were running on SunOS 4.1.3
this would return "\f(CWsun4\fP" or similar.
.LE
.P
This function may be abbreviated to "os".
.H 3 "Example"
This function is usually used to determine
the architecture (either system or machine):
.eB
arch=[os system]-[os release]-[os machine];
if [matches SunOS-4.1%1-sun4%2 [arch]] then
arch = sun4;
else if [matches SunOS-5.%1-sun4%2 [arch]] then
arch = sun5;
else if [matches SunOS-5.%1-i86pc [arch]] then
arch = sun5pc;
else if [matches ConvexOS-%1-%2 [arch]] then
arch = convex;
else
arch = unknown;
.eE
.H 3 "Caveat"
This function is implemented using the
.IR uname (2)
system call.
Some systems do not implement this correctly,
and therefore this function is less useful than it should be,
and needs the pattern match appropach used above.
.H 3 "See Also"
collect
.H 3 "Also Known As"
os
|