CCL: Sorting Question



 Sent to CCL by: Peter Pinski [peter.pinski-forum=-=web.de]
 Hello,
 excuse me, if I am wrong. but I have tried the sort function and it
 seemed that it sorts in an ALPHANUMERICAL order and not in a numerical,
 i.e. 889<991 but 1021<991 !!! because 1<9.
 Maybe I have just used the command in a wrong way because I usually use
 Linux rather than Windows and it really is possible to use dos sort for
 this job - in this case again I would like to apologise - but I don't
 think the sort command is the right thing if it makes an output like this:
 >sort test.txt
 1021.02454
 890.15454
 991.1510
 content of test.txt:
 890.15454
 1021.02454
 991.1510
 Sincerely,
 Peter Pinski
 Phil Hultin hultin- -cc.umanitoba.ca schrieb:
 > Sent to CCL by: "Phil Hultin" [hultin[a]cc.umanitoba.ca]
 > This is a multi-part message in MIME format.
 >
 > ------=_NextPart_000_0046_01C66DC4.72111EA0
 > Content-Type: text/plain;
 > 	charset="us-ascii"
 > Content-Transfer-Encoding: 7bit
 >
 > I have been a bit amused by all the suggestions to help Richard Wood with
 > his question about sorting 2x10^6 lines of text.
 >
 >
 >
 > The majority opinion has been to use some other operating system and to
 > learn a new scripting language.  Did nobody actually read Richard's
 specific
 > statement that he needed something to run under windows, and that was free?
 >
 >
 >
 > I once again point out that windows still contains a perfectly functional
 > command line text sorter (oddly enough, called "SORT"), and it
 will do
 > exactly what is required using the specified operating system with no more
 > learning than just reading the help file.  One line of input required, with
 > arguments to specify the input and output files, and which column of text
 to
 > sort on, as well as other useful parameters.
 >
 >
 >
 > Nothing against all the suggestions people made - these are very nice ways
 > to do the required task.  They just don't meet the customer's
 specification.
 >
 >
 >
 > Dr. Philip G. Hultin
 >
 > Associate Professor of Chemistry,
 >
 > University of Manitoba
 >
 > Winnipeg, MB
 >
 > R3T 2N2
 >
 > hultin__cc.umanitoba.ca
 >
 > http://umanitoba.ca/chemistry/people/hultin
 >
 >
 >
 >
 > ------=_NextPart_000_0046_01C66DC4.72111EA0
 > Content-Type: text/html;
 > 	charset="us-ascii"
 > Content-Transfer-Encoding: quoted-printable
 >
 > <html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
 > xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
 > xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
 > xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
 > xmlns=3D"http://www.w3.org/TR/REC-html40">;
 >
 > <head>
 > <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
 > charset=3Dus-ascii">
 > <meta name=3DGenerator content=3D"Microsoft Word 11 (filtered
 medium)">
 > <o:SmartTagType =
 > namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 >  name=3D"State"/>
 > <o:SmartTagType =
 > namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 >  name=3D"City"/>
 > <o:SmartTagType =
 > namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 >  name=3D"PlaceName"/>
 > <o:SmartTagType =
 > namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 >  name=3D"PlaceType"/>
 > <o:SmartTagType =
 > namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 >  name=3D"place"/>
 > <!--[if !mso]>
 > <style>
 > st1\:*{behavior:url(#default#ieooui) }
 > </style>
 > <![endif]-->
 > <style>
 > <!--
 >  /* Font Definitions */
 >  __font-face
 > 	{font-family:Times;
 > 	panose-1:2 2 6 3 5 4 5 2 3 4;}
 >  /* Style Definitions */
 >  p.MsoNormal, li.MsoNormal, div.MsoNormal
 > 	{margin:0in;
 > 	margin-bottom:.0001pt;
 > 	font-size:12.0pt;
 > 	font-family:"Times New Roman";}
 > p.MsoTitle, li.MsoTitle, div.MsoTitle
 > 	{margin-top:12.0pt;
 > 	margin-right:0in;
 > 	margin-bottom:3.0pt;
 > 	margin-left:0in;
 > 	text-align:center;
 > 	font-size:16.0pt;
 > 	font-family:Arial;
 > 	font-weight:bold;}
 > p.MsoClosing, li.MsoClosing, div.MsoClosing
 > 	{margin-top:12.0pt;
 > 	margin-right:0in;
 > 	margin-bottom:48.0pt;
 > 	margin-left:3.0in;
 > 	font-size:12.0pt;
 > 	font-family:"Times New Roman";}
 > p.MsoSignature, li.MsoSignature, div.MsoSignature
 > 	{margin-top:0in;
 > 	margin-right:0in;
 > 	margin-bottom:6.0pt;
 > 	margin-left:3.0in;
 > 	font-size:12.0pt;
 > 	font-family:"Times New Roman";}
 > p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
 > 	{margin-top:0in;
 > 	margin-right:0in;
 > 	margin-bottom:6.0pt;
 > 	margin-left:0in;
 > 	font-size:12.0pt;
 > 	font-family:"Times New Roman";}
 > p.MsoSalutation, li.MsoSalutation, div.MsoSalutation
 > 	{margin-top:0in;
 > 	margin-right:0in;
 > 	margin-bottom:6.0pt;
 > 	margin-left:0in;
 > 	font-size:12.0pt;
 > 	font-family:"Times New Roman";}
 > p.MsoBodyTextFirstIndent, li.MsoBodyTextFirstIndent, =
 > div.MsoBodyTextFirstIndent
 > 	{margin-top:0in;
 > 	margin-right:0in;
 > 	margin-bottom:6.0pt;
 > 	margin-left:0in;
 > 	text-indent:10.5pt;
 > 	font-size:12.0pt;
 > 	font-family:"Times New Roman";}
 > a:link, span.MsoHyperlink
 > 	{color:blue;
 > 	text-decoration:underline;}
 > a:visited, span.MsoHyperlinkFollowed
 > 	{color:purple;
 > 	text-decoration:underline;}
 > span.Strikeout
 > 	{color:red;
 > 	text-decoration:line-through;}
 > p.Title2, li.Title2, div.Title2
 > 	{margin-top:12.0pt;
 > 	margin-right:0in;
 > 	margin-bottom:6.0pt;
 > 	margin-left:0in;
 > 	text-align:center;
 > 	font-size:24.0pt;
 > 	font-family:"Times New Roman";
 > 	font-weight:bold;}
 > span.EmailStyle25
 > 	{mso-style-type:personal-compose;
 > 	font-family:Arial;
 > 	color:windowtext;}
 > __page Section1
 > 	{size:8.5in 11.0in;
 > 	margin:1.0in 1.25in 1.0in 1.25in;}
 > div.Section1
 > 	{page:Section1;}
 > -->
 > </style>
 > <!--[if gte mso 9]><xml>
 >  <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026"
 />
 > </xml><![endif]--><!--[if gte mso 9]><xml>
 >  <o:shapelayout v:ext=3D"edit">
 >   <o:idmap v:ext=3D"edit" data=3D"1" />
 >  </o:shapelayout></xml><![endif]-->
 > </head>
 >
 > <body lang=3DEN-CA link=3Dblue vlink=3Dpurple>
 >
 > <div class=3DSection1>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 > font-family:Arial'>I have been a bit amused by all the suggestions to =
 > help
 > Richard Wood with his question about sorting 2x10^6 lines of =
 > text.<o:p></o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 >
 font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 > font-family:Arial'>The majority opinion has been to use some other =
 > operating
 > system and to learn a new scripting language. &nbsp;Did nobody actually
 =
 > read Richard&#8217;s
 > specific statement that he needed something to run under windows, and =
 > that was
 > free?<o:p></o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 >
 font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 > font-family:Arial'>I once again point out that windows still contains a
 > perfectly functional command line text sorter (oddly enough, called =
 > &#8220;SORT&#8221;),
 > and it will do exactly what is required using the specified operating =
 > system
 > with no more learning than just reading the help file.&nbsp; One line
 of =
 > input
 > required, with arguments to specify the input and output files, and =
 > which
 > column of text to sort on, as well as other useful =
 > parameters.<o:p></o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 >
 font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 > font-family:Arial'>Nothing against all the suggestions people made =
 > &#8211;
 > these are very nice ways to do the required task. &nbsp;They just =
 > don&#8217;t meet
 > the customer&#8217;s
 specification.<o:p></o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 >
 font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 > font-family:Arial'>Dr. Philip G.
 Hultin<o:p></o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 > font-family:Arial'>Associate Professor of =
 > Chemistry,<o:p></o:p></span></font></p>
 >
 > <p class=3DMsoNormal><u1:place
 u2:st=3D"on"><u1:PlaceType =
 > u2:st=3D"on"><st1:place
 > w:st=3D"on"><st1:PlaceType
 w:st=3D"on"><font size=3D2 face=3DArial><span
 >   =
 >
 style=3D'font-size:10.0pt;font-family:Arial'>University</span></font></st=
 > 1:PlaceType><font
 >  size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;font-family:Arial'></u1:PlaceType>
 >  of <u1:PlaceName u2:st=3D"on"><st1:PlaceName =
 >
 w:st=3D"on">Manitoba</u1:PlaceName></st1:PlaceName></span></font></st1:pl=
 > ace></u1:place><font
 > size=3D2 face=3DArial><span =
 >
 style=3D'font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p=
 >
 > <p class=3DMsoNormal><u1:place
 u2:st=3D"on"><u1:City =
 > u2:st=3D"on"><st1:place
 w:st=3D"on"><st1:City
 >  w:st=3D"on"><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;font-family:
 >   Arial'>Winnipeg</span></font></st1:City><font
 size=3D2 =
 > face=3DArial><span
 >  style=3D'font-size:10.0pt;font-family:Arial'></u1:City>,
 <u1:State =
 > u2:st=3D"on"><st1:State
 >  =
 >
 w:st=3D"on">MB</u1:State></st1:State></span></font></st1:place></u1:place=
 >> <font
 > size=3D2 face=3DArial><span =
 >
 style=3D'font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p=
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 > font-family:Arial'>R3T
 2N2<o:p></o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 > font-family:Arial'><a =
 > href=3D"mailto:hultin__cc.umanitoba.ca";>hultin__cc.umanitoba.ca</a><o:p></o=
 > :p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 > style=3D'font-size:10.0pt;
 > font-family:Arial'><a =
 > href=3D"http://umanitoba.ca/chemistry/people/hultin">http-:-//umanitoba.ca/=
 >
 chemistry/people/hultin</a><o:p></o:p></span></font></p>
 >
 > <p class=3DMsoNormal><font size=3D3 face=3D"Times New
 Roman"><span =
 > style=3D'font-size:
 >
 12.0pt'><o:p>&nbsp;</o:p></span></font></p>
 >
 > </div>
 >
 > </body>
 >
 > </html>
 >
 > ------=_NextPart_000_0046_01C66DC4.72111EA0-->
 >
 >
 >