36 lines
643 B
Groff
36 lines
643 B
Groff
.TH not "" "" "/rdb Command"
|
|
.PC "Logical not, to reverse return status of command"
|
|
\fBnot \fIcommand ...\fR
|
|
.PP
|
|
.II "return value^invert"
|
|
.II "logical NOT"
|
|
The command
|
|
.B not
|
|
converts a return status of zero to 255, and any nonzero
|
|
return status to zero.
|
|
Thus, true becomes false and vice versa.
|
|
This is used to test a command for not true or false.
|
|
.SH Example
|
|
This example shows how
|
|
.B not
|
|
reverses the return code of the COHERENT command
|
|
.BR true :
|
|
.DM
|
|
true ; echo $?
|
|
.DE
|
|
.PP
|
|
This command returns zero.
|
|
On the other hand, the command
|
|
.DM
|
|
not true ; echo $?
|
|
.DE
|
|
.PP
|
|
returns 255.
|
|
.SH "See Also"
|
|
COHERENT Lexicon:
|
|
.B
|
|
false,
|
|
true
|
|
.R
|
|
.SO not
|