Correct usage for parentheses, and mark up "expression" in more places.
From Bug Hunting in PR 42286.
This commit is contained in:
parent
116e5d88b0
commit
193ee60c7d
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: test.1,v 1.26 2009/05/06 08:26:43 wiz Exp $
|
||||
.\" $NetBSD: test.1,v 1.27 2009/11/10 18:19:46 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -32,7 +32,7 @@
|
||||
.\"
|
||||
.\" @(#)test.1 8.1 (Berkeley) 5/31/93
|
||||
.\"
|
||||
.Dd May 5, 2009
|
||||
.Dd November 10, 2009
|
||||
.Dt TEST 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -47,17 +47,24 @@
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm test
|
||||
utility evaluates the expression and, if it evaluates
|
||||
utility evaluates
|
||||
.Ar expression
|
||||
and, if it evaluates
|
||||
to true, returns a zero (true) exit status; otherwise
|
||||
it returns 1 (false).
|
||||
If there is no expression, test also
|
||||
If
|
||||
.Ar expression
|
||||
is not given,
|
||||
.Nm test
|
||||
also
|
||||
returns 1 (false).
|
||||
.Pp
|
||||
All operators and flags are separate arguments to the
|
||||
.Nm test
|
||||
utility.
|
||||
.Pp
|
||||
The following primaries are used to construct expression:
|
||||
The following primaries are used to construct
|
||||
.Ar expression :
|
||||
.Bl -tag -width Ar
|
||||
.It Fl b Ar file
|
||||
True if
|
||||
@ -269,8 +276,10 @@ True if either
|
||||
or
|
||||
.Ar expression2
|
||||
are true.
|
||||
.It Cm \&( Ns Ar expression Ns Cm \&)
|
||||
True if expression is true.
|
||||
.It Cm \&( Ar expression Cm \&)
|
||||
True if
|
||||
.Ar expression
|
||||
is true.
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
@ -300,10 +309,11 @@ The
|
||||
utility exits with one of the following values:
|
||||
.Bl -tag -width Ds
|
||||
.It 0
|
||||
expression evaluated to true.
|
||||
.Ar expression
|
||||
evaluated to true.
|
||||
.It 1
|
||||
expression evaluated to false or expression was
|
||||
missing.
|
||||
.Ar expression
|
||||
evaluated to false or was missing.
|
||||
.It \*[Gt]1
|
||||
An error occurred.
|
||||
.El
|
||||
|
Loading…
x
Reference in New Issue
Block a user