From: Jim Meyering Date: Sat, 31 Jul 1999 17:45:35 +0000 (+0000) Subject: fix up true/false docs to include a couple sentences from Christy's truefalse package X-Git-Tag: SH-UTILS-1_16l~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08aa2e4bded49d5a900aea19e5210b0a2e3b7dc9;p=thirdparty%2Fcoreutils.git fix up true/false docs to include a couple sentences from Christy's truefalse package --- diff --git a/doc/sh-utils.texi b/doc/sh-utils.texi index 6973441ae0..4892050784 100644 --- a/doc/sh-utils.texi +++ b/doc/sh-utils.texi @@ -366,15 +366,21 @@ pipeline. @section @code{false}: Do nothing, unsuccessfully @pindex false - -@cindex exit status of @code{true} +@cindex do nothing, unsuccessfully @cindex failure exit status +@cindex exit status of @code{false} + @code{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. -Any arguments are ignored, except for a lone @samp{--help} or -@samp{--version} (@pxref{Common options}). +@code{false} ignores @emph{all} command line arguments, even @samp{--help} +and @samp{--version}, since to do otherwise would change expected +behavior that some programmers may be relying on. + +This version of @code{false} is implemented as a C program, and is thus +more secure and faster than a shell script implementation, and may safely +be used as a dummy shell for the purpose of disabling accounts. @node true invocation @@ -384,15 +390,20 @@ Any arguments are ignored, except for a lone @samp{--help} or @cindex do nothing, successfully @cindex no-op @cindex successful exit - @cindex exit status of @code{true} + @code{true} does nothing except return an exit status of 0, meaning @dfn{success}. It can be used as a place holder in shell scripts where a successful command is needed, although the shell built-in -command @code{:} (colon) may be faster. +command @code{:} (colon) does the same thing faster. + +@code{true} ignores @emph{all} command line arguments, even @samp{--help} +and @samp{--version}, since to do otherwise would change expected +behavior that some programmers may be relying on. -Any arguments are ignored, except for a lone @samp{--help} or -@samp{--version} (@pxref{Common options}). +This version of @code{true} is implemented as a C program, and is thus +more secure and faster than a shell script implementation, and may safely +be used as a dummy shell for the purpose of disabling accounts. @node test invocation