Name
irand -- generate a uniform random integer value between 0 and 32768
Purpose
Returns a uniformly-distributed random integer between 0 and 32768,
using as a seed either the argument provided or, if none, the
Unix process number
Usage
irand [seed]
Arguments
seed = seed value for random number generator
Exit values
0 = normal completion
1 = wrong number of arguments
Example
1) Return a random value:
punaluu{lris}186: ./irand
21118
punaluu{lris}187: ./irand
6778
Note that the values differ because the time of day (used
by default as the random generator's seed) changed.
2) Return a random value for a given seed:
punaluu{lris}190: ./irand 12345
16565
punaluu{lris}191: ./irand 12345
16565
Note that the values are the same when the same seed is used.
See Also
The shell script irand
DEIMOS script index
Go to:
DEIMOS Home Page -
Instruments Home Page -
Keck Home Page
Last modified: Wed Jun 9 16:30:32 2004