Make a word list from a text

Brendan mailinglist at
Sat Aug 2 19:50:39 BST 2008

On Saturday 02 August 2008, Wulfy wrote:
> 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,

Yeah, the perl debugger in my head doesn't work so well. ;-)

More information about the kubuntu-users mailing list