GNU Info

Info Node: (sh-utils.info)true invocation

(sh-utils.info)true invocation


Next: test invocation Prev: false invocation Up: Conditions
Enter node , (file) or (file)node

`true': Do nothing, successfully
================================

   `true' does nothing except return an exit status of 0, meaning
"success".  It can be used as a place holder in shell scripts where a
successful command is needed, although the shell built-in command `:'
(colon) may do the same thing faster.  In most modern shells, `true' is
built-in command, so when you use `true' in a script, you're probably
using the built-in command, not the one documented here.

   By default, `true' honors the `--help' and `--version' options.
However, that is contrary to POSIX, so when the environment variable
`POSIXLY_CORRECT' is set, `true' ignores _all_ command line arguments,
including `--help' and `--version'.

   `true' ignores _all_ command line arguments, even `--help' and
`--version', since to do otherwise would change expected behavior that
some programmers may be relying on.

   This version of `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.


automatically generated by info2www version 1.2.2.9