home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 446.lha / avlsort / avlsort.doc < prev    next >
Text File  |  1990-12-02  |  2KB  |  72 lines

  1. NAME
  2.     AVLSort - Sort a file.
  3.  
  4. SYNOPSIS
  5.     AVLSort From To COLSTART/k WIDTH/k CASE/s REVERSE/s
  6.  
  7. DESCRIPTION
  8.     AVLSort was written to remedy several defects of the ARP Sort
  9.     command.  AVLSort places each line of text in an AVL tree,
  10.     which has reasonable worst-case performance, even for large
  11.     files.  I have not made speed comparisons with AmigaDos Sort
  12.     or with ARP Sort.
  13.  
  14.     This program can handle large files, up to available memory.
  15.     There is no arbitrary limit on the number of lines in the file
  16.     (I have seen a report that ARP Sort is limited to 32767 lines).
  17.  
  18.     The order of otherwise identical lines does not change in the
  19.     output file.  This can happen in ARP Sort when using the
  20.     COLSTART and WIDTH switches.
  21.  
  22.     If you omit the From argument from Sort, it reads from its
  23.     standard input, which allows it to be used in pipelines.
  24.  
  25. OPTIONS
  26.     COLSTART n
  27.         This takes a numeric argument which gives the starting
  28.         column for the sort. All entries to the left of this
  29.         column will not be considered in the final arrangement.
  30.  
  31.     WIDTH n
  32.         This takes a numeric argument, which gives the width
  33.         for the sort.  You can use this to specify a 'window'
  34.         for Sort to work on.  For example, using a WIDTH of 4
  35.         will arrange a file based on the first 4 characters of
  36.         each line.  If you also use COLSTART, then the first 4
  37.         characters starting at that column will be the ones on
  38.         which the sort is based.
  39.  
  40.     CASE
  41.         The CASE switch will use a case-sensitive match, rather
  42.         than the default case-insensitive match.
  43.  
  44.     REVERSE
  45.         The REVERSE switch will cause the sorted file to be
  46.         printed in reverse order.  This switch is not part
  47.         of the AmigaDos or ARP Sort commands.
  48.  
  49. EXAMPLE
  50.     list >listfile
  51.     avlsort listfile colstart 41
  52.     or using pipes: list | avlsort colstart 41
  53.  
  54.     This gives a listing of all files sorted by time (i.e., from
  55.     the earliest to the latest).
  56.  
  57. BUGS
  58.     File size is limited by available memory.
  59.  
  60. SEE ALSO
  61.     ARP Sort
  62.  
  63. CREDITS
  64.     The AVL tree package was written by Mark E. Mallett of Zinn
  65.     Computer Company, copyright 1988.
  66.  
  67.     The startup code is by Sebastiano Vigna, based on previous
  68.     work by Scott Ballantine and John Toebes.
  69.  
  70.     Much of this document (AVLSORT.DOC) was lifted from the ARP
  71.     documentation for Sort.
  72.