[AmigaOS 3.1 Command Reference\Sort]
Format: SORT [FROM] <file|pattern> [TO] <filename> [COLSTART <n>)
Template: FROM/A, TO/A, COLSTART/K, CASE/S, NUMERIC/S
Purpose: To alphabetically sort the lines of a file.
SORT will sort 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 separated by fteturns or line feeds. SORT normally
disregards capitalization. If the CASE switch is given, capitalized items
will be output first.
The COLSTART keyword allows you to specify the character column at which the
comparison will begin. SORT compares the lines from that point on, and
comparison will wrap around to the beginning of the line if the lines being
compared match to the end.
When the NUMERIC option is specified, the lines are interpreted as numbers
from the first column reading to the right, stopping at the first non-
numeric character. Lines not beginning with numbers are treated as 0. The
lines are output in numerical order. If the CASE switch is given with
NUMERlC, CASE is ignored.
1> SORT DF0:Glossary DF0:Glossary.alpha
Sorts the lines in the Glossary file, arranges them alphabetically, and
outputs them to a new file called Glossary.alpha. The case of the words is
Converted from AmigaGuide to HTML by Matt Owen