Wanted: complex text sorting tool

  • Thread starter Thread starter Andy Mabbett
  • Start date Start date
A

Andy Mabbett

I have some text, extracted from a table by someone else, arranged thus:

a1
b1
c1
a2
b2
c2
a3
b3
c3

and so on.

I need it in the order:

a1
a2
a3
b1
b2
b3
c1
c2
c3

is there a tool which will do this?
 
On Thu, 28 Aug 2003 15:56:17 +0100 Andy Mabbett

:>I have some text, extracted from a table by someone else, arranged thus:

:> a1
:> b1
:> c1
:> a2
:> b2
:> c2
:> a3
:> b3
:> c3

:>and so on.

:>I need it in the order:

:> a1
:> a2
:> a3
:> b1
:> b2
:> b3
:> c1
:> c2
:> c3

:>is there a tool which will do this?

There is the DOS SORT command.
 
Andy Mabbett <[email protected]> wrote:
I have some text, extracted from a table by someone else, arranged thus:

a1
b1
c1
a2
b2
c2
a3
b3
c3
and so on.
I need it in the order:

a1
a2
a3
b1
b2
b3
c1
c2
c3
is there a tool which will do this?

DOS sort is about the best I've seen Andy. I'm not sure if XP has it
or not, I stopped at ME. Most of the editors I have tried have bad
sorting algorithms and have artificially low abilities.

In the same directory as "friend.txt" type:

sort friend.txt > sorted.txt

The file "sorted.txt" will be created and will have the sorted content
of "friend.txt."


NoteTab Lite does the best as far as editors go. It sorted up to 10
megs of text. Others choked on 65k of text.

http://www.notetab.com/ntl.php
 
swooooooop said:
|is there a tool which will do this?
|

FileSort can handle that little task. It sorts the lines in a file into
ascending or descending alphabetical order. The sort is case sensitive
and locale sensitive.

Thank you; but I neither want them in ascending nor descending
alphabetical order; but in the arrangement which I described in my
original post.
 
Andy said:
Thank you; but I neither want them in ascending nor descending
alphabetical order; but in the arrangement which I described in my
original post.

Your original post said:
I need it in the order:

a1
a2
a3
b1
b2
b3
c1
c2
c3

This appears to be in ascending order. If you want something else you
need to clarify what that is.

Terry
 
* Andy Mabbett Wrote in alt.comp.freeware, on Thu, 28 Aug 2003 18:43:41 +0100:
No, nothing there which says how to do what I asked.

Then you must not have even tried.

I took your example and ran it through sort with NO OPTIONS and got your
exact desired result.
 
SINNER said:
Then you must not have even tried.

I took your example and ran it through sort with NO OPTIONS and got
your exact desired result.

I didn't provide any example.
 
On Thu, 28 Aug 2003 19:49:54 +0100 Andy Mabbett

:>In message <[email protected]_of_hell.INVALID>, SINNER

:>>>>>>There is the DOS SORT command.

:>>>>> How would that do what I need?

:>>>>Type sort/? at a prompt and youll see.

:>>> No, nothing there which says how to do what I asked.

:>>Then you must not have even tried.

:>>I took your example and ran it through sort with NO OPTIONS and got
:>>your exact desired result.

:>I didn't provide any example.

Andy,

I suggest that you post a example with true data.

Your test data seemed to be sortable without any difficulty.

On the other hand, if you are simply trolling .....
 
* Andy Mabbett Wrote in alt.comp.freeware, on Thu, 28 Aug 2003 20:35:42 +0100:
It is. Have you read it?

Yes I did.
I did not.

Yes, you did.

Here is your post, headers and all

th: uni-berlin.de!81-5-140-5.dsl.eclipse.net.UK!not-for-mail
From: Andy Mabbett <[email protected]>
Newsgroups: alt.comp.freeware
Subject: Wanted: complex text sorting tool
Date: Thu, 28 Aug 2003 15:56:17 +0100
Organization: Copyright Andy Mabbett, date as above
Lines: 32
Message-ID: <[email protected]>
Reply-To: Andy Mabbett <[email protected]>
NNTP-Posting-Host: 81-5-140-5.dsl.eclipse.net.uk (81.5.140.5)
Mime-Version: 1.0
Content-Type: text/plain;charset=us-ascii
X-Trace: news.uni-berlin.de 1062082882 9281818 81.5.140.5 (16 [60843])
X-Orig-Path: pigsonthewing.org.uk!usenet200305
User-Agent: Turnpike/6.02-U (<m0YxA4iAFHk2pYrnNTdm6O1N+W>)
Xref: uni-berlin.de alt.comp.freeware:240520

I have some text, extracted from a table by someone else, arranged
thus:

a1
b1
c1
a2
b2
c2
a3
b3
c3


and so on.

I need it in the order:

a1
a2
a3
b1
b2
b3
c1
c2
c3


Sort will give the above results. You can yawn all you want, you have
been given the answer to your question over and over yet refuse to see,
that has made you an apparent troll.

If your data is different from the above you will need to be more specifc
about the data.

If the above dosent do it for you, good luck on your own.
 
Andy,

I suggest that you post a example with true data.

Your test data seemed to be sortable without any difficulty.

On the other hand, if you are simply trolling .....

The confusion arises because the parameters weren't made very clear.

Clearly, the sample data as given is easily sortable using DOS's sort
command - but if you ignore the spurious alphanumerical order and
treat the list as a random table without imposition you get a list
that might read something like, let's assume, Mabbett's shopping
list... thus ( alphanumerics removed )

Baby oil
Gin
Lard
Anorak
KY Jelly
Tissues
B.Spears video
More gin
Stockings

Without the a1 b1 etc you essentially have a random list, which is
required to be sorted in an imposed order ( not alphabetical or
numerical ) as below...onto which I have attached the alphanumerics
for clarity.

a1 Baby oil
a2 Anorak
a3 B.Spears video
b1 Gin
b2 KY Jelly
b3 More gin
c1 Lard
c2 Tissues
c3 Stockings

There are two ( off the top of my head ) very simple ways to sort an
undefined list like this - but as Mabbett seems to know so much
better than anyone else I'm sure he can work it out for himself now
that he's had a few hints ( points to second paragraph ).

Both solutions can be achieved with very simple freeware.

Regards,
 
* Steve H Wrote in alt.comp.freeware, on Thu, 28 Aug 2003 23:16:54 +0100:

And since it was HIS request, making assumptions would have been nothing
more than a waste of time. If he knew how to ask the question in the
first place he likely would have gotten more helpful answers, instead he
choose to be vague and obtuse.


Soon find out. ;)

Regards,
 
Steve H wrote:
Mabbett's shopping
list... thus ( alphanumerics removed )

Baby oil
Gin
Lard
Anorak
KY Jelly
Tissues
B.Spears video
More gin
Stockings

ROTFLMAO! I'm more curious about the radical piece of freeware that
generated the degenerate shopping list. ;-)
 
:>On Thu, 28 Aug 2003 22:11:44 +0300, Binyamin Dissen

:>>Andy,

:>>I suggest that you post a example with true data.

:>>Your test data seemed to be sortable without any difficulty.

:>>On the other hand, if you are simply trolling .....

:>The confusion arises because the parameters weren't made very clear.

:>Clearly, the sample data as given is easily sortable using DOS's sort
:>command - but if you ignore the spurious alphanumerical order and
:>treat the list as a random table without imposition you get a list
:>that might read something like, let's assume, Mabbett's shopping
:>list... thus ( alphanumerics removed )

:> Baby oil
:> Gin
:> Lard
:> Anorak
:> KY Jelly
:> Tissues
:> B.Spears video
:> More gin
:> Stockings

:>Without the a1 b1 etc you essentially have a random list, which is
:>required to be sorted in an imposed order ( not alphabetical or
:>numerical ) as below...onto which I have attached the alphanumerics
:>for clarity.
:>
:> a1 Baby oil
:> a2 Anorak
:> a3 B.Spears video
:> b1 Gin
:> b2 KY Jelly
:> b3 More gin
:> c1 Lard
:> c2 Tissues
:> c3 Stockings

:>There are two ( off the top of my head ) very simple ways to sort an
:>undefined list like this - but as Mabbett seems to know so much
:>better than anyone else I'm sure he can work it out for himself now
:>that he's had a few hints ( points to second paragraph ).

:>Both solutions can be achieved with very simple freeware.

That is not a sort requirement.

It is a split/join requirement.
 
I have some text, extracted from a table by someone else, arranged thus:

a1
b1
c1
a2
b2
c2
a3
b3
c3

and so on.

I need it in the order:

a1
a2
a3
b1
b2
b3
c1
c2
c3

is there a tool which will do this?'
I have been using this since the DOS days still does great on Windows
XP. It definitely does what you asked plus a lot more! Don't have the
URL but should be easy to locate!

RPSRT101.ZIP

RPSORT is now free for all to use, no payment is asked. Also
the assembly language source code is free.


**** RPSORT Features ****

RPSORT greatly improves upon the features and performance of the
sort
utility distributed with Microsoft DOS.

. First, it does everything that the DOS SORT does. Virtually any
command that works with the DOS SORT will produce the same result
with RPSORT.

. But RPSORT does much more. It can sort very large files, even
many megabytes if you have sufficient disk space.

. It supports multiple sort keys.

. It sorts text files and files of fixed length records.

. It supports many sort key types including regular text keys, C
language strings, Turbo Pascal strings, signed and unsigned binary
integers of any length and several types of binary floating point
numbers.
 
Back
Top