It is currently Tue, 17 May 2022 18:34:10 GMT

Author Message
 word list
trying to write a script that would take the filename
as arg. and output the list of words in the file without
duplicates and sorted.
anything hint of direction would be helpful.



 Sat, 11 Oct 2003 22:43:33 GMT   
 word list
xargs -n 1 echo < $1 | sort -u

j a m e s wrote:

 Sat, 11 Oct 2003 22:51:49 GMT   
 word list
"j a m e s" <> writes:

Try reading the man page of 'sort'.

Tapani Tarvainen

 Sat, 11 Oct 2003 23:19:53 GMT   
 word list

<> ???g??l

yes, using 'sort -u' would solve the sorting problem.

still figuring out how to list the words from a file.


 Sun, 12 Oct 2003 00:51:17 GMT   
 word list
"j a m e s" <> writes:

So your problem is that you have several words per line?

How about

tr -c '[:alpha:]' '[\n*]' <file | sort -u

Tapani Tarvainen

 Sun, 12 Oct 2003 01:46:39 GMT   
 word list
In article <9c4399$>,
"j a m e s" <> writes:

Depends on what you mean by "words".  Is "1234" a word?  If not,
then you can use deroff:

   deroff -w file | sort -u

Dan Mercer

Opinions expressed herein are my own and may not represent those of my employer.

 Sun, 12 Oct 2003 21:50:07 GMT   
 word list
j a m e s schreef:

take a look at sort and uniq

 Sun, 12 Oct 2003 22:07:00 GMT   
 word list
"j a m e s" <> wrote in message

sort -u <filename>
Stein Arne Storslett

 Mon, 13 Oct 2003 05:30:03 GMT   
 word list
Here's the script that will do it:

for i in $(sort -u $1)
echo $words | sort

"j a m e s" <> wrote in message

 Tue, 14 Oct 2003 08:50:27 GMT   
   [ 9 post ] 

Similar Threads

1. New linux.words word list available

2. Looking for a bad-word list

3. Larger than /etc/dict/words list available ? ftpable

4. Danish,Norwegian word lists needed

5. Parsing line-delimited word list into CSV

6. Where to find word list?

7. British spelling dictionary/words list

8. Getting spell to look at an auxiliary word list...

9. Version 0.3 update of "yawl" word list pkg

10. Searching lists for words from other lists?

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software