aspell command

Everyone needs a little spell checking in their routine. Even the best of us make mistakes. This article goes over the ‘aspellLinux command for spell checking the contents of files that you specify.

Command: aspell
Synopsis: aspell [options] ]

Commands:

CommandLong NameDescription
-?helpDisplays the help information.
-ccheck filenameSpell checks a specific file. This is the most used purpose for the aspell command.
-listDisplays a list of misspelled words from the command line.
-vversionDisplays the version number.

Options:
Below are the different options that are available to customize the aspell command.

OptionLong NameDescription
-W–ignore=nAspell will ignore words less than or equal to n characters in length.
–ignore-case=true/falseSets whether to ignore case or not. It is set to false by default, meaning aspell is case sensitive.
–sug-mode=modeYou can set between different modes: ultra, fast, normal (default), and bad-spellers

Examples

Spell checking a specific file

Here we give the most common base use for the aspell command. To do this, simply use the -c option and then list the file you want to check. The example below shows how to check a file named test.txt.

 # aspell -c test.txt

Spell check without regard to case

If you want to make the spell checker case insensitive, use the following example. You can see we use the previous example and add the –ignore-case=true option.

 # aspell --ignore-case=true -c test.txt

Spell check but ignore smaller words

In this example, we do a spell check on the test.txt file but we want to ignore words of less than 7 characters in length. Again, we use the first example and simply add the –ignore=7 option. You can change the number to be any length you want.

 # aspell --ignore=7 -c test.txt

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+