for i in {1..100000}; do echo $((RANDOM % 2))$((RANDOM % 2)); done | grep 00 | wc
$ for x in $(seq 1 1600000); do \ echo $((RANDOM % 2))$((RANDOM % 2))$((RANDOM % 2))$((RANDOM % 2)); \ done | awk ' { hist[$0]++ } END { for (code in hist) print code, hist[code] }' 0100 99668 0101 99832 0110 100026 0111 99837 0000 99899 0001 100451 0010 99846 0011 99980 1000 100246 1001 100182 1010 100116 1011 100383 1100 100014 1101 99470 1110 99535 1111 100515