Make a word list from a text

Wulfy wulfmann at
Sat Aug 2 05:52:45 UTC 2008

Wulfy wrote:
> I want to take a text file and extract all the words and sort them into 
> a unique list.  I've looked at split, cut, sed and awk (the last two 
> just confused me no end...  :@( ) and I can't find a imple way to do 
> it.  I suppose I could write a Java program to do it, but it seems silly 
> to reinvent the wheel like that.  I'm sure there are a bazillion ways to 
> do it on the command line but I'm flummoxed.  I tried googling and every 
> search string I tried brought me dozens of Windows programs to do the 
> job or python programs, but nothing I could understand...
Many thanks to Mark and Brendan for their help.

Mark's program gave me a list of words, one to a line, I now need to 
remove punctuation.  Brendan's program removed all the spaces but 
otherwise left the rest of the text as it was,



Wulf Credo:
Respect the elders. Teach the young. Co-operate with the pack.
Play when you can. Hunt when you must. Rest in between.
Share your affections. Voice your opinion. Leave your Mark.
Copyright July 17, 1988 by Del Goetz

More information about the kubuntu-users mailing list