NAME AVLSort - Sort a file. SYNOPSIS AVLSort From To COLSTART/k WIDTH/k CASE/s REVERSE/s DESCRIPTION AVLSort was written to remedy several defects of the ARP Sort command. AVLSort places each line of text in an AVL tree, which has reasonable worst-case performance, even for large files. I have not made speed comparisons with AmigaDos Sort or with ARP Sort. This program can handle large files, up to available memory. There is no arbitrary limit on the number of lines in the file (I have seen a report that ARP Sort is limited to 32767 lines). The order of otherwise identical lines does not change in the output file. This can happen in ARP Sort when using the COLSTART and WIDTH switches. If you omit the From argument from Sort, it reads from its standard input, which allows it to be used in pipelines. OPTIONS COLSTART n This takes a numeric argument which gives the starting column for the sort. All entries to the left of this column will not be considered in the final arrangement. WIDTH n This takes a numeric argument, which gives the width for the sort. You can use this to specify a 'window' for Sort to work on. For example, using a WIDTH of 4 will arrange a file based on the first 4 characters of each line. If you also use COLSTART, then the first 4 characters starting at that column will be the ones on which the sort is based. CASE The CASE switch will use a case-sensitive match, rather than the default case-insensitive match. REVERSE The REVERSE switch will cause the sorted file to be printed in reverse order. This switch is not part of the AmigaDos or ARP Sort commands. EXAMPLE list >listfile avlsort listfile colstart 41 or using pipes: list | avlsort colstart 41 This gives a listing of all files sorted by time (i.e., from the earliest to the latest). BUGS File size is limited by available memory. SEE ALSO ARP Sort CREDITS The AVL tree package was written by Mark E. Mallett of Zinn Computer Company, copyright 1988. The startup code is by Sebastiano Vigna, based on previous work by Scott Ballantine and John Toebes. Much of this document (AVLSORT.DOC) was lifted from the ARP documentation for Sort.