Results 1 to 7 of 7
Hi There,
I have recently put together a file [ dictionary ] for use with John. It has took me some time to gather different types of dictionaries, languages excetra. ...
- 10-17-2003 #1Just Joined!
- Join Date
- Oct 2003
- Location
- Glasgow. Scotland
- Posts
- 9
Alphabetically list a file ?
Hi There,
I have recently put together a file [ dictionary ] for use with John. It has took me some time to gather different types of dictionaries, languages excetra. I am now left with a 80 MB file listed with each dictionary a-z consecutivley. Knowing Linux I am sure there must be a way to edit the file [ maybe with vi ? ] as so to list the file as one concurrent dictionary... Also does anyone know of any places I could pick more dictionaries ?
All help or suggestions are accepted thankfully.
Thanks again.
- 10-17-2003 #2Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
try this (back up the files first!)
That would add the contents of <file1> to the end of <bigdictfile>Code:cat <file1> >> <bigdictfile>
repeat for all the dictionary files, and you will have 1 big file with all the words in.
Jason
- 10-17-2003 #3Just Joined!
- Join Date
- Oct 2003
- Location
- Glasgow. Scotland
- Posts
- 9
<bigdictionary>
Thanks Jason, but that sounds like about two hours work to me [ I should have thought of that when i was compiling the file in the first place ] i have been looking at a command I found "sort" ? would this not sort the file into alphabetical order ????
- 10-17-2003 #4Linux User
- Join Date
- Jun 2003
- Location
- Calgary, AB CANADA
- Posts
- 496
I think he's already got them all in one big file with individual chunks of alphabetically listed entries. He now wants to have all the entries sorted alphebetically.
Try this:
or you could have originally done:Code:sort dictionary > dictionary-new
Code:cat file1 file2 file3 | sort > dictionary
*edit: You beat me in, lub0. Yep, try the sort command.\"Everything should be made as simple as possible, but not simpler.\"
Albert Einstein
- 10-17-2003 #5Just Joined!
- Join Date
- Oct 2003
- Location
- Glasgow. Scotland
- Posts
- 9
Shear Luck
Thanks CopperTop, believe me I accidently stumbled across that command, by the looks of it you already new it
.
[quote] sort dictionary > dictionary-new
It worked a treat, cheers mate.
- 10-17-2003 #6Just Joined!
- Join Date
- Oct 2003
- Location
- Glasgow. Scotland
- Posts
- 9
strange characters
Hi all,
CopperTop this is mainly aimed at yourself, after running the command
sort dictionary > dictionary-new
I find I now have strange characters at the end of some of the words
Example:
asoon^M
aspaththiriyila
aspaththiriyila^M
assiden^M
Strange, any ideas
Many advance thanks for your help.
- 10-17-2003 #7
This is where you have been using files in DOS format on linux, They are carrage returns at the end of each line, You can try this -> http://www.xys.org/~science/forum/messages/21695.html


Reply With Quote
