All pastes #332385 Raw Edit

Anonymous

public text v1 · immutable
#332385 ·published 2007-01-29 23:13 UTC
rendered paste body
# Generate binary choice, that is, "true" or "false" value.
BINARY=2
T=1
number=$RANDOM

let "number %= $BINARY"
#  Note that    let "number >>= 14"    gives a better random distribution
#+ (right shifts out everything except last binary digit).
if [ "$number" -eq $T ]
then
  echo "TRUE"
else
  echo "FALSE"
fi  

echo