1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-12 15:06:44 +02:00

(false invocation):

Mention that false is often built-in, and that it exits
with status >1 on some hosts.
(true invocation): Remove now-incorrect "non-POSIX mode" reference.
This commit is contained in:
Paul Eggert
2005-07-18 07:51:32 +00:00
parent 829fcc0991
commit 8445b707fd

View File

@@ -9577,6 +9577,9 @@ pipeline.
@command{false} does nothing except return an exit status of 1, meaning
@dfn{failure}. It can be used as a place holder in shell scripts
where an unsuccessful command is needed.
In most modern shells, @command{false} is a built-in command, so when
you use @samp{false} in a script, you're probably using the built-in
command, not the one documented here.
@command{false} honors the @option{--help} and @option{--version} options.
@@ -9588,6 +9591,10 @@ Note that @command{false} (unlike all other programs documented herein)
exits unsuccessfully, even when invoked with
@option{--help} or @option{--version}.
Portable programs should not assume that the exit status of
@command{false} is 1, as it is greater than 1 on some
non-@acronym{GNU} hosts.
@node true invocation
@section @command{true}: Do nothing, successfully
@@ -9609,8 +9616,8 @@ command, not the one documented here.
@command{true} honors the @option{--help} and @option{--version} options.
Note, however, that it is possible to cause @command{true}
to exit with nonzero status: when invoked in non-@acronym{POSIX} mode,
with the @option{--help} or @option{--version} option, and with standard
to exit with nonzero status: with the @option{--help} or @option{--version}
option, and with standard
output already closed or redirected to a file that evokes an I/O error.
For example, using a Bourne-compatible shell: