How can I declare and use Boolean variables in a shell script?
Revised Answer (Feb 12, 2014) the_world_is_flat=true # …do something interesting… if [ “$the_world_is_flat” = true ] ; then echo ‘Be careful not to fall off!’ fi Original Answer Caveats: https://stackoverflow.com/a/21210966/89391 the_world_is_flat=true # …do something interesting… if $the_world_is_flat ; then echo ‘Be careful not to fall off!’ fi From: Using boolean variables in Bash The reason … Read more