Answers for "bash test boolean"

5

bash test boolean

the_world_is_flat=true
# ...do something interesting...
if [ "$the_world_is_flat" = true ] ; then
    echo 'Be careful not to fall off!'
fi
Posted by: Guest on March-06-2020
0

bash test boolean

trueOrFalse=true
if ${trueOrFalse} ; then
	echo "to consider ${trueOrFalse} is a boolean value"
else
	echo "Correct me if any."
fi
Posted by: Guest on July-12-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language