Current File : //usr/man/man1/machid.1
'\" te
.\"  Copyright 1989 AT&T
.\" Copyright (c) 1990, 2014, Oracle and/or its affiliates. All rights reserved.
.TH machid 1 "13 Feb 2014" "SunOS 5.11" "User Commands"
.SH NAME
machid, sun, i386, i486, sparc \- get processor type truth value
.SH SYNOPSIS
.LP
.nf
\fBsun\fR 
.fi

.LP
.nf
\fBi386\fR 
.fi

.LP
.nf
\fBsparc\fR 
.fi

.SH DESCRIPTION
.sp
.LP
The following commands will return a true value (exit code of 0) if you are using an instruction set that the command name indicates.
.sp
.ne 2
.mk
.na
\fB\fBsun\fR\fR
.ad
.RS 9n
.rt  
True if you are on a Sun system.
.RE

.sp
.ne 2
.mk
.na
\fB\fBi386\fR\fR
.ad
.RS 9n
.rt  
True if you are on a computer using an iAPX386 processor.
.RE

.sp
.ne 2
.mk
.na
\fB\fBsparc\fR\fR
.ad
.RS 9n
.rt  
True if you are on a computer using a SPARC-family processor.
.RE

.sp
.LP
The commands that do not apply will return a false (non-zero) value. These commands are often used within makefiles (see \fBmake\fR(1S)) and shell scripts (see \fBsh\fR(1)) to increase portability.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Availabilitysystem/core-os
.TE

.SH SEE ALSO
.sp
.LP
\fBmake\fR(1S), \fBsh\fR(1), \fBtest\fR(1), \fBtrue\fR(1), \fBuname\fR(1), \fBattributes\fR(5)
.SH NOTES
.sp
.LP
The \fBmachid\fR family of commands is obsolete and could be deleted in a future release of Oracle Solaris. Use \fBuname\fR \fB-p\fR instead.