Page 1 of 1 1
Topic Options
#1303 - 2000-01-06 04:58 AM Alphabetic search
PaulMoxey Offline
Getting the hang of it

Registered: 1999-07-22
Posts: 90
Loc: Villawood, NSW, Australia
As part of a script I run over a log of about 10,000 lines of ftp transfers (I didn't know what else to use, and kix does the whole thing in about 10 minutes where it took about 3-4 hours to perform a maunaul check), the output produced is in the form of a .csv. (I couldn't wouk out how to OL functions worked to create a true Excel file)

What I' dlike to do is alphabetically sort the lines that are produced. There's maybe 80-100 lines that I want to sort alphabetically as I current use the sort in Excel BEFORE printing. I want it automatically sorted and then I can use sendsmtp or something similar to mail me the results eady for printing.

Anyone got any ideas? I remember years ago having about a dozen lines of "code" in basic (remember basic?) that performed a sort on a text file using some arry method or something similar.

I thought I'd ask before sitting down and playing for hours on end... Why re-invent the wheel?

------------------
Paul Moxey
POS & Senior Network Administrator
Taubmans Pty Ltd
Paul_Moxey@taubmans.com.au

_________________________
Paul Moxey POS & Senior Network Administrator BarloworldCoatings (AUST) Pty Ltd

Top
#1304 - 2000-01-11 02:22 AM Re: Alphabetic search
Anonymous
Unregistered


use the old DOS command SORT
Try SORT /? for syntax
For example the command is
SORT < "c:\my file to sort" > "c:\my sorted file"
Easy isn't.
It perform and alphanumerical sort from left to right.

You can start this command from that kind of .kix line

SHELL "CMD /C SORT < "+$INFILE+" > "+$>OUTFILE

Have fun with this

Top
#1305 - 2000-01-11 11:37 PM Re: Alphabetic search
PaulMoxey Offline
Getting the hang of it

Registered: 1999-07-22
Posts: 90
Loc: Villawood, NSW, Australia
Now <b>THAT</b> is pure genius!
Why must we always try to do things the hard way!
It was there all along - thanx a bundle!

------------------
Paul Moxey
POS & Senior Network Administrator
Taubmans Pty Ltd
Paul_Moxey@taubmans.com.au

_________________________
Paul Moxey POS & Senior Network Administrator BarloworldCoatings (AUST) Pty Ltd

Top
#1306 - 2000-01-12 11:09 AM Re: Alphabetic search
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
There are several different variants of the sort utility available (I use zsort). Also depending on what you are doing maybe a DOS utility would be better for extracting or finding what you are looking for.

I use this line to extract a line associated with a specific computer.

Type l:\machines.ini | Find "%computer%" /i > l:\pcfile.tmp

_________________________
Jack

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.049 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org