13
Aug

Using ‘aspell’ to Spellcheck a File via Terminal

The utility aspell (along with others such as spell and hunspell), can be used to spellcheck a file from the terminal. You can also specify a file “mode” for which to scan. Modes include plain text, HTML, sgml, LaTeX, and others.

Usage Example
To list all of the spelling mistakes of the file “testfile.txt”, use:

aspell list < textfile.txt

To list all of the spelling mistakes of the HTML document “testpage.html”, use:

aspell --mode=html list < testpage.html

As always, be sure to take a look at the man pages for more information. Keep in mind that certain distributions may not come with aspell pre-installed, so you may need to use the package manager to install it (ie. apt-get install aspell or yum install aspell).

Feel free to donate if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that you may be interested in:


There's 1 Comment So Far

  • Bruce
    May 7th, 2011 at 3:51 am

    Good tool!
    Another good way to check spelling is to use some sort of online spell check tool.

Share your thoughts, leave a comment!