The original Unix spell-checking program, spell (Section 15.1), is fine for quick checks of spelling in a short document, but it makes you cry out for a real spellchecker, which not only shows you the misspelled words in context, but offers to change them for you.
Go to http://examples.oreilly.com/upt3 for more information on: ispell
ispell, a very useful program that's been ported to Unix and enhanced over the years, does all this and more. Either it will be preinstalled or you'll need to install it for your Unix version.
Here's the basic usage: just as with spell, you spell check a document by giving ispell a filename. But there the similarities cease. ispell takes over your screen or window, printing two lines of context at the bottom of the screen. If your terminal can do reverse video, the offending word is highlighted. Several alternate possibilities are presented in the upper-left corner of the screen -- any word in ispell's dictionary that differs by only one letter, has a missing or extra letter, or transposed letters.
Faced with a highlighted word, you have eight choices:
But that's not all! ispell also saves a copy of your original file with a .bak extension, just in case you regret any of your changes. If you don't want ispell making .bak files, invoke it with the -x option.
How about this: ispell knows about capitalization. It already knows about proper names and a lot of common acronyms -- it can even handle words like "TEX" that have oddball capitalization. Speaking of TEX, ispell has special modes in which it recognizes TEX constructions.
If ispell isn't on your system by default, you should be able to find an installation of it packaged in your system's own unique software-installation packaging, discussed in Chapter 40.
In addition, you can also look for a newer spell-checking utility, aspell , based on ispell but with improved processing. Though aspell is being considered a replacement for ispell, the latter is still the most commonly found and used of the two.
-- TOR
Copyright © 2003 O'Reilly & Associates. All rights reserved.