#!/usr/bin/env bash BINARY=2 T=1 number=$RANDOM let "number %= $BINARY" if [ "$number" -eq $T ] then exit 1; else exit 0; fi