UNSORT(1) | General Commands Manual | UNSORT(1) |
unsort
— reorder
lines in a file in semirandom ways
unsort |
[-hvrpncmMsz0l ] [--help ]
[--version ] [--random ]
[--heuristic ] [--identity ]
[--filenames [=profile]]
[--separator sep]
[--concatenate ] [--merge ]
[--merge-random ] [--seed
integer] [--zero-terminated ]
[--null ] [--linefeed ]
[file ...] |
unsort
prints the lines in the input files
(or standard input) in semi-random order. Available algorithms are a
Mersenne Twister based PRNG and a heuristic algorithm that aims to create a
subjective even distribution.
-h,
--help
-v,
--version
-r,
--random
-p,
--heuristic
-n,
--identity
-f,
--filenames
[=profile]An example would be a list of mp3 files where the top level is
the genre, the second level is the name of the artist and the third
level is the name of the album. The --filenames
option allows you to randomize the list with different randomization
strategies for each of the artist, album and track levels.
Two types of randomization are supported: simple and proportional. Simple randomization picks one entry from each directory at that level in a round-robin fashion. If one directory contains fewer entries than the others, it will run out and stop appearing at some point before the end of the output.
Proportional randomization will spread the directory entries evenly over the output.
The profile argument can be used to specify which randomization types to use. It is a concatenation of the randomization types to use for each level. Use 1 for simple randomization and n for proportional randomization. If the input has more levels than specified, the last character determines the randomization type for all subsequent levels.
For example,
--filenames
=n1n means: use
proportional randomization for the genre, use simple randomization for
the artists and use proportional randomization again for the album names
and all levels below that.
-S,
--separator
sep-f
. Defaults
to ‘/’.-r,
--concatenate
-m,
--merge
-M,
--merge-random
-s,
--seed
integer-z,
--zero-terminated,
-0,
--null
-l,
--linefeed
2007-11-25 | Free Software |