oem.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
SORT
Notes  Examples
────────────────────────────────────────────────────────────────────────────
 
                                    SORT
 
Reads input, sorts data, and writes the results to the screen, a file, or
another device.
 
SORT acts as a filter, reading characters in a specified column and
rearranging them in ascending or descending order.
 
Syntax
 
    SORT [/R] [/+n] [<] [drive1:][path1]filename1
    [> [drive2:][path2]filename2]
 
    [command |] SORT [/R] [/+n] [> [drive2:][path2]filename2]
 
Parameters
 
[drive1:][path1]filename1
    Specifies the location and name of the file whose data you want to
    sort.
 
[drive2:][path2]filename2
    Specifies the location and name of a file in which the sorted output is
    to be stored.
 
command
    Specifies a command whose output is the data you want to sort.
 
Switches
 
/R
    Reverses the order of the sorting operation; that is, sorts from Z to A,
    and then from 9 to 0.
 
/+n
    Sorts the file according to the character in column n. If you do not use
    this switch, the SORT command sorts data according to the characters in
    column 1.
 
Related Command
 
For information about displaying information one screen at a time, see the
<MORE> command.
 
                                      ♦