Credits
Description
Options
:Credits

SORT is based on the sort program from Software Tools by Kernighan & Plauger

It was converted to BDS C by Leor Zolman

It was converted to C80 with a private run time system by Michael M Rubenstein
:Description

SORT will sort ASCII text files on a single key.  Only ascending order is
supported.  There are, however, a large number of options controlling the
makeup of the key.

To invoke SORT use the command

	sort [<options>] [<input file> [<output file]]

If output file is not specified, the output file will have the same name as
the input file.  If neither input nor output file is specified, input will be
from stdin and output will be to stdout, either or both of which may be
redirected.

If the <output file> already exists, the old copy will be renamed with a
file type of .BAK.
:Options

The following options are supported:

    -c          start key after character.  character is next
                parameter.  "^" may be used to specify a control
                character.  the words "space" or "tab" may be
                used to denote those characters.  if the next
                parameter is the word "lower", the parameter
                after that will be used, converted to lower case.

    -d          number of characters (specified by -c) to look
                for.  if omitted, 1 is used.

    -e          end key at character.  same format as for -c

    -f          key consists of one or more fields.  next 
                parameter is the number of the field to start
                at (1, 2, ...)

    -i          ignore case.  case is not considered in comparisons.

    -l          key consists of one or more fields.  next
                parameter is the number of the field to end
                at (1, 2, ...)

    -n          print counts of lines in and out

    -p          position.  followed by position in line
                and length of key.  position is relative
                to 0.

    -r          sort in reverse order.

    -u          only a single line having a given key will be
                output.  if the key is not the entire record,
                there is no control over which of the lines will
                be output, making this option of little use
                unless the entire line is sorted.

    -v          verbose mode.  messages showing progress are
                displayed.  implies -n

  if -f is specifed and the end is less than the start field
  or omitted, the end is taken as equal to the start.

  -e is ineffective if -f or -l is specified

  if -l is specified and the start is omitted, the start is taken
  as 1.

  -f or -l may be specified with -c, in which case field 1 is
  the first one after the specified character.

  -p may be specified with -c, in which case the start of
  the field is relative to the the character after the
  start character

  -p may be specified with -f or -l, in which case the search
  for fields begins in position p.  the length is ignored
  (but must be specified)

  there is no check for validity of the character at which to
  start.  characters such as ^z, ^@ or ^j which cannot appear
  in a line, will result in all lines being considered equal.

  if -c is specified, all lines not containing the start character
  are considered equal.
      verbose mode.  messa