COHERENT manpages
This page displays the COHERENT manpage for mksort [Sort the standard input, allowing arbitrarily long lines].
List of available manpages
Index
mksort -- Command
Sort the standard input, allowing arbitrarily long lines
/usr/lib/mail/mksort [ -f ] [ file ... ]
The command mksort reads lines of text, sorts them by the first field in
each line, then writes them to the standard output. It usually is used by
system administrators to help prepare the data files used by smail. Unlike
the COHERENT command sort, mksort can read and process an arbitrarily long
line of text.
The first field within a line of input is delimited either by a white-space
character or a colon `:'. A line can be of any length, as long as the
entire input can be stored in memory. Command-lind option -f (for
``fold'') tells mksort to ignore case when it sorts its input; with this
option, the letter `A' equals the letter `a', and `a' is always less than
`B'.
If its command line does not name an input file, mksort reads the standard
input. A file name of `-' indicates the standard input; this permits
mksort to mingle the contents of one or more files with what it reads from
the standard input.
Example
The following example demonstrates how to use mksort with mkline. Consider
file aliases, which contains the following aliasing information:
Postmaster:hustead # Ted Hustead, jr.
UUCP-Postmasters: tron, chongo # namei contacts
yamato # kremvax contact
tron: tron@namei.uucp (Ronald S. Karr)
yamato: yamato@kremvax.ussr.comm (Yamato T. Yankelovich)
chongo: chongo@eek.uts.amdahl.com (Landon Curt Noll)
Given this file, the command
mkline aliases | mksort -f
yields:
chongo:chongo@eek.uts.amdahl.com
Postmaster:hustead
tron:tron@namei.uucp
UUCP-Postmasters:tron,chongo yamato
yamato:yamato@kremvax.ussr.comm
See Also
commands,
mail [overview],
mkline,
mkdbm,
pathalias,
smail
Notes
This command is not used by COHERENT's implementation of smail.
Copyright © 1987, 1988 Ronald S. Karr and Landon Curt Noll. Copyright
© 1992 Ronald S. Karr.
For details on the distribution rights and restrictions associated with
this software, see file COPYING, which is included with the source code to
the smail system; or type the command: smail -bc.











