Msort is a program for sorting files in sophisticated ways. Records need not
be single lines. Key fields may be selected by position, tag, or character
range. For each key, distinct exclusions, multigraphs, substitutions. and a
sort order may be defined. Comparisons may be lexicographic, numeric, by
string length, date, or time. Optional keys are supported. Msort uses the
Unicode character set and provides full Unicode case-folding. The basic
program has a somewhat complex command line interface, but may be driven
by an optional GUI.
This package consists of two related programs.
The first, msort, is the actual sort program.
It has a command-line interface and is written in C.
The code is quite standard and no exotic libraries
are required, so it should compile and run on
any POSIX-compliant system.
The one non-standard library required is
Ville Laurikari's TRE regular expression library,
available at http://laurikari.net/tre
If a key has comparison type "random, we don't bother to store it
since we aren't going to use it. This saves a little time
and possibly a good bit of storage.
If one or more records have been discarded due to problems in key
extraction but the run is otherwise successful, the exit code is
now RECORDEXCLUDED (13) rather than BADRECORD (8).
ISO8601 keys may now have an optional le