version 1.9, 1995/04/28 23:27:13 |
version 1.10, 1997/10/20 08:51:56 |
|
|
.Nm expr |
.Nm expr |
.Nd evaluate expression |
.Nd evaluate expression |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm expr |
.Nm |
.Ar expression |
.Ar expression |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
The |
The |
.Nm expr |
.Nm |
utility evaluates |
utility evaluates |
.Ar expression |
.Ar expression |
and writes the result on standard output. |
and writes the result on standard output. |
.Pp |
.Pp |
All operators are separate arguments to the |
All operators are separate arguments to the |
.Nm expr |
.Nm |
utility. |
utility. |
Characters special to the command interpreter must be escaped. |
Characters special to the command interpreter must be escaped. |
.Pp |
.Pp |
Line 88 The following example returns the number |
|
Line 88 The following example returns the number |
|
.El |
.El |
.Sh DIAGNOSTICS |
.Sh DIAGNOSTICS |
The |
The |
.Nm expr |
.Nm |
utility exits with one of the following values: |
utility exits with one of the following values: |
.Bl -tag -width Ds -compact |
.Bl -tag -width Ds -compact |
.It 0 |
.It 0 |
Line 100 the expression is invalid. |
|
Line 100 the expression is invalid. |
|
.El |
.El |
.Sh STANDARDS |
.Sh STANDARDS |
The |
The |
.Nm expr |
.Nm |
utility conforms to |
utility conforms to |
.St -p1003.2 . |
.St -p1003.2 . |