PACKAGE |
|STAT Data Manipulation and Analysis,
by Gary Perlman
|
NAME |
perm - permute line order
|
---|
SYNOPSIS |
perm [-a | -c | -e | -i | -n | -j] [-r] [-l lines] [-s seed]
|
---|
DESCRIPTION |
perm reads lines from the standard input and prints them in permuted
order. By default, this order is random, but the order can be sorted
numerically or alphabetically with options.
|
---|
OPTIONS |
- -a
- Sort lines by alphabetic ordering. Initial blank space is not
ignored.
- -c
- Use a case-insensitive comparison and sort by alphabetic
ordering.
- -e
- Sort lines by exponential (scientific) notation ordering.
Initial blank space is ignored. This method does true numerical
sorting for all numbers, but is much slower than integer or
numerical sorting.
- -i
- Sort lines by integer ordering. Initial blank space is ignored.
- -j
- Control juxtaposition of adjacent input lines. By default,
adjacent input lines can come out next to each other. With this
option, if two input lines are next to each other, then they will
not be next to each other in the output. For the purposes of
this program, the very first and very last lines are considered
to be next to each other. It is impossible to produce non-
juxtaposed output from four lines or less. It is unknown whether
all non-juxtaposed permutations are equally probable.
- -l
- Set the maximum number of lines to be read.
- -n
- Sort lines by special numeric ordering. Numbers with decimal
points are allowed, and compared by a special fast sorting
algorithm that is almost as fast as integer sorting.
- -r
- Reverse the order of comparison for sorting options.
- -s
- Provide an integer seed for the random number generator.
Otherwise, the seeding is done with the process number and the
time, or, on some systems, by prompting for a seed.
The following standard help options are supported.
The program exits after displaying the help.
- -L
- Display limits
- -O
- Display options and values
- -V
- Display version number and date
|
---|
NOTES |
The program duplicates some of the sort program's functions, but
provides true numerical sorting for MSDOS whose sort only does
alphabetic sorts.
|
---|
LIMITS |
Use the -L option to determine the program limits.
|
---|
SEE ALSO |
series to generate an additive series.
repeat to repeat strings/files.
probdist to generate series based on probability distributions.
dm to manipulate contents of lines.
dsort to sort matrix format files.
linex to extract lines.
reverse to reverse lines.
|
---|
UPDATED |
August 1992
|
---|