Short: The BEST OF THE BEST sort command v1.1 Author: rodrigue@iles.siera.ups-tlse.fr (Frédéric RODRIGUES) Uploader: rodrigue iles siera ups-tlse fr (Frédéric RODRIGUES) Type: util/cli Requires: any amiga Architecture: m68k-amigaos Sort 1.3 (2-3-97) © Frédéric RODRIGUES freeware Best sort command Works with all amigas. WHAT IS IT ? ~~~~~~~~~~~~ Someday I looked for a command on aminet wich could sort the INDEX file because I build a file with a comment for the files I download from aminet. All I could find were clones of amiga sort command (some faster, some shorter). But I need a sort command wich do this : "I want to sort lines by ranges (like unix sort)" My Sort command have the following options : COLSTART/K,COLEND/K,CASE/S,REVERSE/S | | V V NEW ! for free I will explain the WONDERFULL interest of COLEND option. For that I give you an example : Consider this file: SmallC.lha dev/c 41K 447+Port of the Small-C compiler. SourcOpt.lha dev/asm 12K 227+Assembly source optimizier Examples.lha dev/asm 186K 397+Misc example assembly programs. emptyhandler.lha dev/c 4K 231+filehandler ex., make empty files AsmExamples.lha dev/asm 7K 427+Two assembly code examples. SFPatch.lha dev/c 8K 82+How to SetFunction()/Patch library functions. after use of this: > Sort a COLEND 19 > Sort down COLSTART 20 COLEND 29 I obtain: AsmExamples.lha dev/asm 7K 427+Two assembly code examples. Examples.lha dev/asm 186K 397+Misc example assembly programs. SourcOpt.lha dev/asm 12K 227+Assembly source optimizier emptyhandler.lha dev/c 4K 231+filehandler ex., make empty files SFPatch.lha dev/c 8K 82+How to SetFunction()/Patch library functions. SmallC.lha dev/c 41K 447+Port of the Small-C compiler. YES I CAN SORT BY MULTIPLE RANGES. First a sort by directory, then by file. Tanks to that, sorting becomes so easy ! It's like excel : you sort by one column descending (with the REVERSE option - try it !), another ascending, another descending, etc ... until infinite. YEAR ! I programed Sort in E (© Wouter van Oortmerssen). If you don't know it, I suggest you take a look on aminet/dev/e. OPTIONS ~~~~~~~ COLSTART/K - start of the range (1 by default) COLEND/K - end of the range (unlimited by default) CASE/S - if you want case separation (A<>a) use it REVERSE/S - if you want sort in reverse mode (z before a) TECHNICS ~~~~~~~~ I use a very efficient algorythm to load file into memory. It's faster than FGets() of v36 dos.library ! I make usage of chained strings (very easy to do in E). This way I need a minimum of memory to load the file in. My sorting algorythm is very fast. I don't use arp.library to parse the command line under 1.3 because I use my own routine. Good for you 1.3 users ! If you read the text until here you probably know there is an internal dynamic buffer where to read the file. That's why COLEND is unlimited. This means lines can have any number of characters and you can load any number of lines of course. LEGAL STUFF ~~~~~~~~~~~ Sort is freeware. Keep all files together if you distribute it. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. HOW TO REACH ME ? ~~~~~~~~~~~~~~~~~ by email : rodrigue@iles.siera.ups-tlse.fr (IP 130.120.84.50) by mail : Frédéric RODRIGUES 4 allées Antonio Machado app 3009D 31100 Toulouse Come on (e)mail me for anything !