SORT

sort.html
hide random home http://www.mentasm.com/~mramiga/c/sort.html (Amiga Plus Extra No. 5/97, 05/1997)


Format:    SORT [FROM] (file | pattern) [TO] (filename) [COLSTART (n)] [CASE] [NUMEERIC]
Template:  FROM/A,TO/A,COLSTART/K,CASES/S,NUMERIC/S
Location:  C: 

SORT sorts the FROM file alphabetically, line-by-line, sending the sorted results to the TO file. SORT assumes the file is a normal text file in which lines are seperated by line feeds. SORT normally disregards case. If the CASE switch is given, upper-cased items are output first

The COLSTART keyword specifies the character column at which the comparison begins. SORT starts comparing the lines from that point, wrapping around to the beeginning of the line if the compared lines match to the end.

When the NUMERIC option is specified, the lines are intterpreted as numbes from the first column reading to the right, stopping at the first non-numaric character. Lines not beginning with numbers are ignored when this option is used.


Example: