Initial release | January 1979 |
---|---|
Operating system | Unix and Unix-like |
Platform | Cross-platform |
Type | Command |
In Unix-like operating systems, true
and false
are commands whose only function is to always return with a predetermined exit status. Programmers and scripts often use the exit status of a command to assess success (exit status zero) or failure (non-zero) of the command. The true
and false
commands represent the logical values of command success, because true returns 0, and false returns 1.[Note 1]
Cite error: There are <ref group=Note>
tags on this page, but the references will not show without a {{reflist|group=Note}}
template (see the help page).