By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,952 Members | 1,858 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,952 IT Pros & Developers. It's quick & easy.

Need to sort a very large list of words

P: n/a
I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.
Jan 8 '07 #1
Share this Question
Share on Google+
10 Replies


P: n/a
" Frank" <fr***@a-znet.comwrote in message news:OZ*************@TK2MSFTNGP04.phx.gbl...
>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.


Why not use the command line utility sort.exe?

Willy.

Jan 8 '07 #2

P: n/a

" Frank" <fr***@a-znet.comwrote in message
news:OZ*************@TK2MSFTNGP04.phx.gbl...
>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Suggestion, first pigeonhole the data, by reading one line at a time, and
putting all the As in one file, Bs in another, etc, without worrying about
sorting. Then, sort each file independently, then catenate all the files
back together.
>

Thanks in advance.

Jan 8 '07 #3

P: n/a
I'll bite... what does "too large" mean?

Is there some actual number of words you might let us in on? I don't mean
to sound silly but if it is gazillion you'd probably run into different
problems than if it was just .5 gazillion. Other than that are you sorting
it in realtime, once per hour, once per day, on demand, this one time and
then who cares?

" Frank" <fr***@a-znet.comwrote in message
news:OZ*************@TK2MSFTNGP04.phx.gbl...
>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.

Any helpful comments?
Thanks in advance.

Jan 8 '07 #4

P: n/a
I didn't know it existed. I'll try

thanks

"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:Ow**************@TK2MSFTNGP04.phx.gbl...
>" Frank" <fr***@a-znet.comwrote in message
news:OZ*************@TK2MSFTNGP04.phx.gbl...
>>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.


Why not use the command line utility sort.exe?

Willy.

Jan 8 '07 #5

P: n/a
Thanks, I think I'll try the suggestion from Willy then Ben if needed
"Tom Leylan" <tl*****@nospam.netwrote in message
news:er**************@TK2MSFTNGP06.phx.gbl...
I'll bite... what does "too large" mean?

Is there some actual number of words you might let us in on? I don't mean
to sound silly but if it is gazillion you'd probably run into different
problems than if it was just .5 gazillion. Other than that are you
sorting it in realtime, once per hour, once per day, on demand, this one
time and then who cares?

" Frank" <fr***@a-znet.comwrote in message
news:OZ*************@TK2MSFTNGP04.phx.gbl...
>>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.

Any helpful comments?
Thanks in advance.


Jan 8 '07 #6

P: n/a
Good idea, thanks
"Ben Voigt" <rb*@nospam.nospamwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
>
" Frank" <fr***@a-znet.comwrote in message
news:OZ*************@TK2MSFTNGP04.phx.gbl...
>>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?

Suggestion, first pigeonhole the data, by reading one line at a time, and
putting all the As in one file, Bs in another, etc, without worrying about
sorting. Then, sort each file independently, then catenate all the files
back together.
>>

Thanks in advance.


Jan 8 '07 #7

P: n/a
I would create a table in SQL2005 Express and read each word line at a
time into the data table. Then pull out using ORDER BY clause and
write to output file.

Something like this gets even easier with a software like LLBLGenPro
(http://llblgen.com) I imagine this could all be done in a matter of 5
mins. or less :)
Frank wrote:
I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.
Jan 9 '07 #8

P: n/a
Or he could lease time on Deep Blue. But why would he need an OR mapper to
sort a list of words?

I don't believe anybody knows why he wants to do it in which case an old
copy of FoxPro can sort them as could any number of free database tools.
The last thing on my list would have been Word, I didn't even know Word
could do such a thing. If I wanted MS Office to do it I might have given
Excel a shot at it. :-)

"Sir C4" <Va*******@gmail.comwrote in message
news:11**********************@i15g2000cwa.googlegr oups.com...
>I would create a table in SQL2005 Express and read each word line at a
time into the data table. Then pull out using ORDER BY clause and
write to output file.

Something like this gets even easier with a software like LLBLGenPro
(http://llblgen.com) I imagine this could all be done in a matter of 5
mins. or less :)
Frank wrote:
>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.

Jan 9 '07 #9

P: n/a
"Sir C4" <Va*******@gmail.comwrote in message
news:11**********************@i15g2000cwa.googlegr oups.com...
>I would create a table in SQL2005 Express and read each word line at a
time into the data table. Then pull out using ORDER BY clause and
write to output file.

Something like this gets even easier with a software like LLBLGenPro
(http://llblgen.com) I imagine this could all be done in a matter of 5
mins. or less :)

If you are familiar with it. I may try it just to learn about SQL

Thanks

>

Frank wrote:
>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.

Jan 10 '07 #10

P: n/a
Thanks to all but the first reply about the command line sort utility worked
great.
If that didn't I sure the second reply would have been simple to program.


"Tom Leylan" <tl*****@nospam.netwrote in message
news:OD**************@TK2MSFTNGP02.phx.gbl...
Or he could lease time on Deep Blue. But why would he need an OR mapper
to sort a list of words?

I don't believe anybody knows why he wants to do it in which case an old
copy of FoxPro can sort them as could any number of free database tools.
The last thing on my list would have been Word, I didn't even know Word
could do such a thing. If I wanted MS Office to do it I might have given
Excel a shot at it. :-)

"Sir C4" <Va*******@gmail.comwrote in message
news:11**********************@i15g2000cwa.googlegr oups.com...
>>I would create a table in SQL2005 Express and read each word line at a
time into the data table. Then pull out using ORDER BY clause and
write to output file.

Something like this gets even easier with a software like LLBLGenPro
(http://llblgen.com) I imagine this could all be done in a matter of 5
mins. or less :)
Frank wrote:
>>I have a text file, one word per line.
I want to arrange the lines alphabetically so I opened it into MS Word
and
asked Word to sort it.
Word said that the list was too big for it.
I figure I'll write a program to sort the file.
But I wonder if Word can't handle it what things I'll run into and
what's
the best way to proceed.

I have no idea what kind of limits the are on array sizes and such.
Any helpful comments?
Thanks in advance.


Jan 10 '07 #11

This discussion thread is closed

Replies have been disabled for this discussion.