DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

random(1)


random -- generate a random number

Synopsis

   random [-s] [scale]

Description

random generates a random number on the standard output, and returns the number as its exit value. By default, this number is either 0 or 1. If scale is given a value between 1 and 255, then the range of the random value is from 0 to scale. If scale is greater than 255, an error message is printed.

When the -s (silent) option is given, then the random number is returned as an exit value, but is not printed on the standard output. If an error occurs, random returns an exit value of zero.

References

rand(3C)

Notices

This command does not perform any floating point computations. random uses the time of day as a seed.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004