home *** CD-ROM | disk | FTP | other *** search
- # cliche - generate an endless stream of cliches
- # AWK page 113
- BEGIN {
- FS = ":";
- srand();
- }
- {
- x[NR] = $1;
- y[NR] = $2;
- }
- END {
- for ( i = 1 ; i < 200 ; i++ )
- print x[randint(NR)],y[randint(NR)];
- }
- function randint(n){
- return int(n * rand()) + 1;
- }
-