Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!rphroy!caen!ox.com!math.fu-berlin.de!unidui!unido!mikros!mwtech!martin From: martin@mwtech.UUCP (Martin Weitzel) Newsgroups: comp.unix.questions Subject: Re: random numbers in awk? Message-ID: <1136@mwtech.UUCP> Date: 9 May 91 15:39:58 GMT References: <26019@adm.brl.mil> <1991Apr24.041134.14519@athena.mit.edu> Reply-To: martin@mwtech.UUCP (Martin Weitzel) Organization: MIKROS Systemware, Darmstadt/W-Germany Lines: 13 In article <1991Apr24.041134.14519@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes: > > [...] another possibility is >to use the jot(1) program to generate a random number, if your system has jot. SysV User's should note that they have a similar program, called random. It's range of output values is restricted to 0..255 (the upper limit must be specified as a calling argument). If you need larger numbers, you can, of course, call random twice, multiply the result of the first call by 256, add the result of the second call, and take the whole thing modulo the largest number you want. -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83