home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum16.lzh
/
SOFTWARE
/
AWK
/
EXAMPLES
/
rnd
< prev
next >
Wrap
Text File
|
1991-05-06
|
384b
|
22 lines
#
# rnd - write some random numbers
#
# note taht there is only a BEGIN in this program!
#
# syntax: gawk -f rnd
#
# status: OK bug:
#
function random(N) {
return int(N * rand() +1)
}
BEGIN {
for (i=1; i<=30; i++) {
for (j=random(10); j > 0; j--)
printf "%d ",random(100)
printf "\n"
}
exit
}