The program RandomPermutation produces a list of random numbers.
Usage: RandomPermutation [-o] [-d] [-x] [-s seed] [-v] [-h] [num]
Print a random permutation of numbers from 0 thru num-1 on standard output. num is supplied on the command line as a decimal number (default is 100). Optional arguments -o, -d, and -x selection octal, decimal, and hexadecimal output base (default decimal). -s seed sets the seed. -v prints seed on standard error. -h prints this help.
seed is typically a list of comma-separated numbers, e.g., -s ""; -s 1234; -s 1,2,3,4; etc. You can repeat a permutation by using the form of the seed printed to standard error with -v, as the argument to -s, e.g., -s "[671916,1201036551,9299,562196172,2008]". If the seed is omitted, a "unique" seed is used.
This is used by the "shuffle" script to shuffle the lines of a file.
The shell script shuffle uses the output of RandomPermutation to shuffle the lines of a file.
Usage: shuffle [-h] [-s seed] [-v] [file]
shuffles the lines of file (or standard input). Requires that "RandomPermutation n" produces a random permutation of the integers [0,n). -s seed sets the seed (as in RandomPermutation). -v prints the seed used on standard error. -h prints help.