There are a lot of different ways to specify boolean value--true, 23497, yes--not to mention all of the uppercase and lowercase permutations. "UnifyBoolean.sh" processes all the different permutations and outputs '1' or '0' for easy and efficient logic handling. It is most useful when you are not sure what kind of results you are going to get from user input or output of scripts.
"UnifyBoolean.sh" can handle uppercase and lowercase values. Any numerical value greater than 0 is consider true, while any numerical value less than 1 is considered false. True, yes, 't', and 'y' are considered as true values. False, no, 'f', and 'n' are considered as false values.
"UnifyBoolean.sh" accepts the boolean value either on the command-line or piped in through stdout.
"UnifyBoolean.sh" takes advantage of the "IsNumber.sh" (GPL) shell script, which is also available on this site. So to use the this script, you will need to download the "IsNumber.sh" script if you don't already have it.
"UnifyBoolean.sh" is distributed as executable source code under the GNU General Public License. Please see the license agreement elsewhere on this site.
Did your message disappear? Read the Forums FAQ.
Title: Unify Boolean (Freeware)
Spam Control | * indicates required field
Messages, files, and images copyright by respective owners.
14 Users Online
Copyright © 1996 - 2018. All Rights Reserved.