1 '\" te 2 .\" Copyright 1989 AT&T 3 .\" Copyright (c) 1999, Sun Microsystems, Inc. 4 .\" All Rights Reserved 5 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. 6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. 7 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] 8 .TH MACHID 1 "Jul 5, 1990" 9 .SH NAME 10 machid, sun, iAPX286, i286, i386, i486, i860, pdp11, sparc, u3b, u3b2, u3b5, 11 u3b15, vax, u370 \- get processor type truth value 12 .SH SYNOPSIS 13 .LP 14 .nf 15 \fBsun\fR 16 .fi 17 18 .LP 19 .nf 20 \fBiAPX286\fR 21 .fi 22 23 .LP 24 .nf 25 \fBi386\fR 26 .fi 27 28 .LP 29 .nf 30 \fBpdp11\fR 31 .fi 32 33 .LP 34 .nf 35 \fBsparc\fR 36 .fi 37 38 .LP 39 .nf 40 \fBu3b\fR 41 .fi 42 43 .LP 44 .nf 45 \fBu3b2\fR 46 .fi 47 48 .LP 49 .nf 50 \fBu3b5\fR 51 .fi 52 53 .LP 54 .nf 55 \fBu3b15\fR 56 .fi 57 58 .LP 59 .nf 60 \fBvax\fR 61 .fi 62 63 .LP 64 .nf 65 \fBu370\fR 66 .fi 67 68 .SH DESCRIPTION 69 .sp 70 .LP 71 The following commands will return a true value (exit code of 0) if you are 72 using an instruction set that the command name indicates. 73 .sp 74 .ne 2 75 .na 76 \fB\fBsun\fR\fR 77 .ad 78 .RS 11n 79 True if you are on a Sun system. 80 .RE 81 82 .sp 83 .ne 2 84 .na 85 \fB\fBiAPX286\fR\fR 86 .ad 87 .RS 11n 88 True if you are on a computer using an iAPX286 processor. 89 .RE 90 91 .sp 92 .ne 2 93 .na 94 \fB\fBi386\fR\fR 95 .ad 96 .RS 11n 97 True if you are on a computer using an iAPX386 processor. 98 .RE 99 100 .sp 101 .ne 2 102 .na 103 \fB\fBpdp11\fR\fR 104 .ad 105 .RS 11n 106 True if you are on a PDP-11/45\(tm or PDP-11/70\(tm. 107 .RE 108 109 .sp 110 .ne 2 111 .na 112 \fB\fBsparc\fR\fR 113 .ad 114 .RS 11n 115 True if you are on a computer using a SPARC-family processor. 116 .RE 117 118 .sp 119 .ne 2 120 .na 121 \fB\fBu3b\fR\fR 122 .ad 123 .RS 11n 124 True if you are on a 3B20 computer. 125 .RE 126 127 .sp 128 .ne 2 129 .na 130 \fB\fBu3b2\fR\fR 131 .ad 132 .RS 11n 133 True if you are on a 3B2 computer. 134 .RE 135 136 .sp 137 .ne 2 138 .na 139 \fB\fBu3b5\fR\fR 140 .ad 141 .RS 11n 142 True if you are on a 3B5 computer. 143 .RE 144 145 .sp 146 .ne 2 147 .na 148 \fB\fBu3b15\fR\fR 149 .ad 150 .RS 11n 151 True if you are on a 3B15 computer. 152 .RE 153 154 .sp 155 .ne 2 156 .na 157 \fB\fBvax\fR\fR 158 .ad 159 .RS 11n 160 True if you are on a VAX-11/750\(tm or VAX-11/780\(tm. 161 .RE 162 163 .sp 164 .ne 2 165 .na 166 \fB\fBu370\fR\fR 167 .ad 168 .RS 11n 169 True if you are on an IBM\(rg System/370\(tm computer. 170 .RE 171 172 .sp 173 .LP 174 The commands that do not apply will return a false (non-zero) value. These 175 commands are often used within makefiles (see \fBmake\fR(1S)) and shell scripts 176 (see \fBsh\fR(1)) to increase portability. 177 .SH SEE ALSO 178 .sp 179 .LP 180 \fBmake\fR(1S), \fBsh\fR(1), \fBtest\fR(1), \fBtrue\fR(1), \fBuname\fR(1), 181 \fBattributes\fR(5) 182 .SH NOTES 183 .sp 184 .LP 185 The \fBmachid\fR family of commands is obsolete. Use \fBuname\fR \fB-p\fR and 186 \fBuname\fR \fB-m\fR instead.