home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Help / locale / help / english / sys / sort.doc < prev    next >
Encoding:
Text File  |  2000-10-06  |  1.2 KB  |  40 lines

  1. SORT
  2.  
  3. Alphabetically sorts the lines of a file.
  4.  
  5. Format
  6.  
  7. SORT [FROM] <file | pattern> [TO] <filename> [COLSTART <n>] [CASE] [NUMERIC]
  8.  
  9. Template
  10.  
  11. FROM/A,TO/A,COLSTART/K,CASE/S,NUMERIC/S
  12.  
  13. Location
  14.  
  15. C:
  16.  
  17. SORT sorts the FROM file alphabetically, line-by-line, sending the sorted
  18. results to the TO file. SORT assumes the file is a normal text file in which
  19. lines are separated by line feeds. SORT normally disregards case. If the CASE
  20. switch is given, upper-cased items are output first.
  21.  
  22. The COLSTART keyword specifies the character column at which the comparison
  23. begins. SORT starts comparing the lines from that point, wrapping around to
  24. the beginning of the line if the compared lines match to the end.
  25.  
  26. When the NUMERIC option is specified, the lines are interpreted as numbers
  27. from the first column reading to the right, stopping at the first non-numeric
  28. character. Lines not beginning with numbers are treated as 0. The lines are
  29. output in numerical order. CASE is ignored when NUMERIC is specified.
  30.  
  31. Example:
  32.  
  33. 1> SORT DF0:Glossary TO DF0:Glossary.alpha
  34.  
  35. sorts the lines in the Glossary file, arranges them alphabetically, and
  36. outputs them to a next file called Glossary.alpha. The case of the words is
  37. disregarded.
  38.  
  39. For more examples using the SORT command, see Chapter 8.
  40.