Here is the input file:
how
much
wood
would
a
wood
chuck
chuck
if
a
wood
chuck
would
chuck
wood
We want to generate a list of the unique words followed by their frequency of occurrence in the file. The list of words is to be sorted by the left column (the key).
a 2
chuck 4
how 1
if 1
much 1
wood 4
would 2