File: shuffle.awk

package info (click to toggle)
freetts 1.2.2-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 65,244 kB
  • sloc: java: 21,305; xml: 1,340; sh: 969; lisp: 587; ansic: 241; makefile: 25; awk: 11
file content (14 lines) | stat: -rw-r--r-- 220 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
BEGIN { NWORDS=2 }

{ words[count] = $1; count++ }
END { 
    for (i = 0 ; i < 50000; i++) {
	for (j = 0; j < NWORDS; j++) {
	    idx = int((rand() * count));
	    printf("%s ",  words[idx]);
	}
	printf("\n");
    }
}