http://wiki.ljackson.us/index.php?title=CMsort&action=history&feed=atom CMsort - Revision history 2024-03-28T23:14:46Z Revision history for this page on the wiki MediaWiki 1.7.1 http://wiki.ljackson.us/index.php?title=CMsort&diff=2959&oldid=prev Ljackson at 23:02, 6 February 2008 2008-02-06T23:02:58Z <p></p> <p><b>New page</b></p><div>Do you (still) need to sort plain text files with DOS, WINDOWS, UNIX, MAC (or even mixed!) end-of-line marks? Or files with fixed-length records? Then you should take a look at CMSort, a freeware command line sort utility for Windows 95/98/NT/2000/XP.<br /> <br /> == Usage ==<br /> <br /> &lt;pre&gt;<br /> CMsort version 1.6 - Sort a DOS, WINDOWS, UNIX, MAC, or mixed text file<br /> (c) 2002 Christian Maas (chmaas@handshake.de www.chmaas.handshake.de)<br /> Currently available physical memory: 998,760,448 bytes<br /> Usage: CMsort [sort field] ... [option] ... &lt;input file&gt; &lt;output file&gt;<br /> Sort fields: /S=F,L string from position F with length L (case sensitive)<br /> /C=F,L string from position F with length L (case insensitive)<br /> /N=F,L numeric from position F with length L<br /> Notes: 1. The complete line is used as sort field when running<br /> CMsort without indicating sort fields.<br /> 2. Use L=0 for the last non-numeric sort field to define<br /> a (part-) key until end of line.<br /> Options: /F=n read/write files with fixed-length records (n byte without CR/LF)<br /> /B ignore blank or empty records<br /> /D ignore records with duplicate keys (according to sort fields)<br /> /D=&lt;file&gt; ignore records with duplicate keys, write them to &lt;file&gt;<br /> /Q quiet mode (no progress output)<br /> /H=n don't sort n header lines (default: n=0)<br /> /W=n n-way-merge of temporary files (2&lt;=n&lt;=5, default: n=5)<br /> /T=&lt;path&gt; for temporary files (/T=TMP for Windows temporary file path)<br /> /M=n[p] use n KB [or n% of physical available] memory;<br /> default: use 10%, at least 100 KB, but max. 1024 KB<br /> otherwise: use as indicated, but at least 100 KB<br /> Use CMsort /E to show examples.<br /> &lt;/pre&gt;<br /> <br /> == Merging CSV Files ==<br /> <br /> The following line will merge all .csv files into the output.csv file.<br /> <br /> type *.csv &gt; output.csv<br /> <br /> == Sorting CSV Files ==<br /> <br /> The following line will preform a ascending numerical sort on the input file.<br /> <br /> CMsort.exe /N=5,13- /B input.csv output.csv<br /> <br /> === Removing Duplicates ===<br /> <br /> The following line will preform an ascending numerical sort on the input file and remove any duplicates.<br /> <br /> CMsort.exe /N=5,13- /B /D input.csv output.csv<br /> <br /> == Sources ==<br /> <br /> * http://www.chmaas.handshake.de/delphi/freeware/cmsort/cmsort.htm<br /> <br /> [[Category: Windows XP]]</div> Ljackson