true and false (commands)

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.

true
Initial releaseJanuary 1979 (1979-01)
Operating systemUnix and Unix-like
PlatformCross-platform
TypeCommand
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.