false

Official Description

The false command returns a nonzero exit value.

Syntax

false

Options

None

Oddities

Typically used to check for nonzero exit status.

Can be considered a do-nothing, unsuccessful command.

Example

$ until false                # Keeps looping until false returns true
                             # (never happens)
> do
> date
> done
Sun Nov 26 17:38:22 EST 2000
Sun Nov 26 17:38:22 EST 2000
    (...)
CTRL+C
				

Get Korn Shell Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.