Hi,
I am attempting to use diff for the purpose of spell checking. Here is what I have thus far. I am using the Bourne shell (sh).
diff -i list.txt '/usr/share/dict/words'
I am comparing my list of words (list.txt) with another list (a dictionary).
Here is what is contained in list.txt:
brown
brown
brown
fjkjk
fox
fox
I
I
I
I
is
is
is
is
the
the
The
this
this
this
this
Thursday
Today
I get output like the following: (just a part of the output)
> browis
> browless
> browman
3,4c53558,75240
< brown
---
> brown-armed
> brownback
> brown-backed
I thought that the "<" meant that the word was found in my file but not in the dictionary and thus not a correctly spelled word. However, it is doing this for "brown" as well as others later down the list. I also think that the ">" means that the word is in the dictionary but not in my file, meaning just that I can ignore it. I need some way of getting words that aren't in the dictionary using the diff utility.
Thanks for your time