Amiga Unix — 68040 · 68060

Manual pages › General commands (1)

random(1)

generates a random number.

From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.

Also by this name: random(7), Devices and drivers · random(3B), BSD C library

NAME

random - generates a random number.

SYNOPSIS

random [-s][scale]

DESCRIPTION

random generates a random number, scale, 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.

SEE ALSO

rand(3C).

NOTES

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