Red Hat Bugzilla – Bug 64062
$RANDOM alternates between even and odd numbers
Last modified: 2007-04-18 12:42:18 EDT
Description of Problem:
$RANDOM alternates between even and odd numbers.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. bash -c 'echo $((($RANDOM+$RANDOM) % 2))'
0 or 1 at 50 per cent probability each
Fixed in current version of bash available via rawhide.
(Or at least can't reproduce the described behaviour with the current version
Read ya, Phil