diff options
author | wollman <wollman@FreeBSD.org> | 2002-04-22 21:23:09 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 2002-04-22 21:23:09 +0000 |
commit | e46c2e6ba94761edeaba49e1fa820140066e3ea8 (patch) | |
tree | 0cabdac92e2713ee366194c0caf44cb311121310 /bin/expr/expr.1 | |
parent | d4c507ea29a089a017b39ff7d76624177ec4bb5b (diff) | |
download | FreeBSD-src-e46c2e6ba94761edeaba49e1fa820140066e3ea8.zip FreeBSD-src-e46c2e6ba94761edeaba49e1fa820140066e3ea8.tar.gz |
Provide an environment variabloe, EXPR_COMPAT, which disables option
parsing for compatibility with old implementations.
Diffstat (limited to 'bin/expr/expr.1')
-rw-r--r-- | bin/expr/expr.1 | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/bin/expr/expr.1 b/bin/expr/expr.1 index df4c70b..4669000 100644 --- a/bin/expr/expr.1 +++ b/bin/expr/expr.1 @@ -111,7 +111,9 @@ otherwise 0. .Pp Parentheses are used for grouping in the usual manner. .Pp -This version of +Unless the +.Ev EXPR_COMPAT +variable is defined in the process environment, this version of .Nm adheres to the .Tn POSIX @@ -141,6 +143,15 @@ The syntax of the command in general is historic and inconvenient. New applications are advised to use shell arithmetic rather than .Nm . +.Sh ENVIRONMENT +.Bl -tag -compact -width EXPR_COMPAT +.It Ev EXPR_COMPAT +If set, +.Nm +will emulate historic +.Nm +implementations which did not obey the Utility Syntax Guidelines. +.El .Sh EXAMPLES .Bl -bullet .It @@ -216,7 +227,10 @@ the expression is invalid. The .Nm utility conforms to -.St -p1003.1-2001 . +.St -p1003.1-2001 , +provided that the +.Ev EXPR_COMPAT +environment variable is not defined. .Tn POSIX does not specify whether arithmetic overflow is detected, nor does it specify the possible range of integer arguments to |