Hi, man ksh says:

     RANDOM     A random number generator.  Every time RANDOM is referenced,
                it is assigned the next random number in the range 0-32767.
                By default, arc4random(3) is used to produce values.  If the
                variable RANDOM is assigned a value, the value is used as the
                seed to srand(3) and subsequent references of RANDOM will use
                rand(3) to produce values, resulting in a predictable
                sequence.

however, man srand says:

     To satisfy portable code, srand() may be called to initialize the
     subsystem.  In OpenBSD the seed variable is ignored, and strong random
     number results will be provided from arc4random(3).  In other systems,
     the seed variable primes a simplistic deterministic algorithm.

     If the standardized behavior is required srand_deterministic() can be
     substituted for srand(), then subsequent rand() calls will return results
     using the deterministic algorithm.

Reply via email to