'\" te .\" Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. .\" Copyright 1989 AT&T .\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures .TH let 1 "12 Jul 2011" "SunOS 5.11" "User Commands" .SH NAME let \- shell built-in function to evaluate one or more arithmetic expressions .SH SYNOPSIS .SS "ksh88" .LP .nf \fBlet\fR \fIarg\fR... .fi .SS "ksh" .LP .nf \fBlet\fR [\fIexpr\fR...] .fi .SH DESCRIPTION .SS "ksh88" .sp .LP Each \fIarg\fR is a separate arithmetic expression to be evaluated. .SS "ksh" .sp .LP \fBlet\fR evaluates each \fIexpr\fR in the current shell environment as an arithmetic expression using ANSI C syntax. Variables names are shell variables and they are recursively evaluated as arithmetic expressions to get numerical values. \fBlet\fR has been made obsolete by the \fB((...))\fR syntax of \fBksh\fR(1) which does not require quoting of the operators to pass them as command arguments. .SH EXIT STATUS .SS "ksh88" .sp .LP \fBksh88\fR returns the following exit values: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 5n .rt The value of the last expression is \fBnon-zero\fR. .RE .sp .ne 2 .mk .na \fB\fB1\fR\fR .ad .RS 5n .rt The value of the last expression is zero. .RE .SS "ksh" .sp .LP \fBksh\fR returns the following exit values: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt The last \fIexpr\fR evaluates to a \fBnon-zero\fR value. .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .RS 6n .rt The last \fIexpr\fR evaluates to \fB0\fR or an error occurred. .RE .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 \fBksh\fR(1), \fBksh88\fR(1), \fBset\fR(1), \fBtypeset\fR(1), \fBattributes\fR(5)