Name

false

Synopsis

    false

A do-nothing command that returns an unsuccessful (nonzero) exit status. Normally used in Bourne shell scripts. See also true.

false is built into most modern shells.

Examples

# This loop never executes
    while false
    do
            commands
    done

    # This loop executes forever
    until false
    do
            commands
    done

Get Unix in a Nutshell, 4th Edition 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.