Aspell - Command-Line Spell Checker
Aspell is a powerful and versatile command-line spell checker designed for terminal users. It helps developers and writers identify and correct spelling errors efficiently within text files or directly from standard input. This tool is invaluable for maintaining the quality and accuracy of written content, especially in code comments, documentation, and plain text files.
Spell Check a File
To spell check a specific file, use the check
command followed by the file path. Aspell will then interactively prompt you to correct any misspelled words it finds.
aspell check [FILE]
List Misspelled Words
If you prefer to get a list of all misspelled words from a file without interactive correction, you can pipe the file's content to Aspell's list
command.
cat [FILE] | aspell list
Manage Dictionaries
Aspell relies on dictionaries to perform its spell-checking functions. You can view the available dictionaries on your system using the dicts
command. The dump dicts
command provides a similar output, listing all known dictionary files.
aspell dicts
aspell dump dicts