If you want to check a text file for typos, Linux can help.
It has a couple of tools and a number of commands that can point out the errors including aspell and enchant, and I’ll share a script that I put together recently that looks for typos using the system’s words file.
aspell is very clever tool that will point out typos and make it surprisingly easy to fix them. When used to make changes to a single file, it reverses the text and background colors to highlight misspelled words. You would start it with a command like this:
$ aspell check myfile
If aspell detects no typos, it simply exits. Otherwise, it will open with a display that contains the file text (or just the top lines depending on the length of the file) followed by a list of suggested replacement words and, below that, a list of the commands that you can run. The first typo (or suspected typo) will be displayed with the text and background colors reversed as shown below.
Source:: Network World – Data Center