bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: $RANDOM is unusable


From: Chet Ramey
Subject: Re: $RANDOM is unusable
Date: Thu, 16 Jan 2003 08:55:49 -0500

> GNU bash, version 2.04.11(1)-release (i386-redhat-linux-gnu)
> Copyright 1999 Free Software Foundation, Inc.
> On Pentium III (Coppermine), 794.719, 255928 kB RAM
> 
> The $RANDOM is totally unusable if called with some invariable interval.
> The below code is meant to produce random numbers between 1-4, but instead
> it just produces a string of form i=i+1; where only the initial value of i
> is random.

Upgrade.  The random-number generator is better in bash-2.05b.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )

Chet Ramey, ITS, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]