Tuesday, January 11, 2022

The truth about Linux true and false commands

True and false are common concepts in all forms of computing. They’re critical to Boolean logic after all, but did you know that true and false are also commands on Linux? Do you know how to use them?

The simplest explanation is that the true command generates an exit code of 0 and that the false command generates an exit code of 1. This explanation, however, doesn’t provide much detail on how these commands can best be used.

In this post, we’ll look at how the true and false commands work and how you might put them to use on the command line or in your scripts.

To read this article in full, please click here


Thanks to Sandra Henry-Stocker (see source)

No comments:

Post a Comment