Sort
Reads input, sorts data, and writes the results to the screen, to a file, or
to another device.
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.
/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.
See Also
filter commands
redirection symbols
More Information About Sort
Sort--Notes
Sort--Examples