
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.ljackson.us/skins/common/feed.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>CMsort - Revision history</title>
		<link>http://wiki.ljackson.us/index.php?title=CMsort&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.7.1</generator>
		<lastBuildDate>Fri, 01 May 2026 11:22:50 GMT</lastBuildDate>
		<item>
			<title>Ljackson at 23:02, 6 February 2008</title>
			<link>http://wiki.ljackson.us/index.php?title=CMsort&amp;diff=2959&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CMsort version 1.6 - Sort a DOS, WINDOWS, UNIX, MAC, or mixed text file&lt;br /&gt;
(c) 2002 Christian Maas (chmaas@handshake.de  www.chmaas.handshake.de)&lt;br /&gt;
Currently available physical memory: 998,760,448 bytes&lt;br /&gt;
Usage:   CMsort [sort field] ... [option] ... &amp;lt;input file&amp;gt; &amp;lt;output file&amp;gt;&lt;br /&gt;
Sort fields: /S=F,L string  from position F with length L (case sensitive)&lt;br /&gt;
             /C=F,L string  from position F with length L (case insensitive)&lt;br /&gt;
             /N=F,L numeric from position F with length L&lt;br /&gt;
             Notes: 1. The complete line is used as sort field when running&lt;br /&gt;
                       CMsort without indicating sort fields.&lt;br /&gt;
                    2. Use L=0 for the last non-numeric sort field to define&lt;br /&gt;
                       a (part-) key until end of line.&lt;br /&gt;
Options: /F=n read/write files with fixed-length records (n byte without CR/LF)&lt;br /&gt;
         /B ignore blank or empty records&lt;br /&gt;
         /D ignore records with duplicate keys (according to sort fields)&lt;br /&gt;
         /D=&amp;lt;file&amp;gt; ignore records with duplicate keys, write them to &amp;lt;file&amp;gt;&lt;br /&gt;
         /Q quiet mode (no progress output)&lt;br /&gt;
         /H=n don't sort n header lines (default: n=0)&lt;br /&gt;
         /W=n n-way-merge of temporary files (2&amp;lt;=n&amp;lt;=5, default: n=5)&lt;br /&gt;
         /T=&amp;lt;path&amp;gt; for temporary files (/T=TMP for Windows temporary file path)&lt;br /&gt;
         /M=n[p] use n KB [or n% of physical available] memory;&lt;br /&gt;
            default:   use 10%, at least 100 KB, but max. 1024 KB&lt;br /&gt;
            otherwise: use as indicated, but at least 100 KB&lt;br /&gt;
Use CMsort /E to show examples.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Merging CSV Files ==&lt;br /&gt;
&lt;br /&gt;
The following line will merge all .csv files into the output.csv file.&lt;br /&gt;
&lt;br /&gt;
 type *.csv &amp;gt; output.csv&lt;br /&gt;
&lt;br /&gt;
== Sorting CSV Files ==&lt;br /&gt;
&lt;br /&gt;
The following line will preform a ascending numerical sort on the input file.&lt;br /&gt;
&lt;br /&gt;
 CMsort.exe /N=5,13- /B input.csv output.csv&lt;br /&gt;
&lt;br /&gt;
=== Removing Duplicates ===&lt;br /&gt;
&lt;br /&gt;
The following line will preform an ascending numerical sort on the input file and remove any duplicates.&lt;br /&gt;
&lt;br /&gt;
 CMsort.exe /N=5,13- /B /D input.csv output.csv&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
* http://www.chmaas.handshake.de/delphi/freeware/cmsort/cmsort.htm&lt;br /&gt;
&lt;br /&gt;
[[Category: Windows XP]]&lt;/div&gt;</description>
			<pubDate>Wed, 06 Feb 2008 23:02:58 GMT</pubDate>			<dc:creator>Ljackson</dc:creator>			<comments>http://wiki.ljackson.us/Talk:CMsort</comments>		</item>
	</channel>
</rss>