Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 64062 - $RANDOM alternates between even and odd numbers
$RANDOM alternates between even and odd numbers
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: wdovlrrw
Ben Levenson
: Security
Depends On:
  Show dependency treegraph
Reported: 2002-04-24 16:35 EDT by Philipp Rumpf
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-04-24 16:35:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Philipp Rumpf 2002-04-24 16:35:43 EDT
Description of Problem:
$RANDOM alternates between even and odd numbers.

Version-Release number of selected component (if applicable):
bash 2.05.8(1)-release

How Reproducible:

Steps to Reproduce:
1. bash -c 'echo $((($RANDOM+$RANDOM) % 2))'

Actual Results:

Expected Results:
0 or 1 at 50 per cent probability each
Comment 1 Phil Knirsch 2002-07-23 04:31:38 EDT
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

Note You need to log in before you can comment on or make changes to this bug.