After having written a lot of scripts, I've gone tired of testing if
boolean variables contain one string or another (e.g. "yes" vs "no"),
so I've started setting them to "true"/"false" and started using them
like this:
sim_ac_foo_exists=false;
if test <foo exists>; then
sim_ac_foo_exists=true
fi
Then I later use the following conventions:
if $sim_ac_foo_exists; then # this usage drops the test command
: whoopie doo
fi
$sim_ac_foo_exists || exit 1 # this even drops the if; then; fi
My questions are; are there systems where the "false" and "true" commands
don't exists, and are there other problems with scripting things this way?
Lars J