aspell command in Linux with examples
aspell command is used as a spell checker in Linux. Generally, it will scan the given files or anything from standard input then it check for misspellings. Finally it allows the user to correct the words interactively.
Syntax:
aspell check [options] filename
Options:
- -a : To check individual words.
- -c : Check a file for specific error.
- -mode=mode : The modes we have to use when checking files.
- -master=name : It is the main dictionary to use.
- -dont-backup : It doesn’t create a backup file.
- -encoding=name :Encoding the file is expected to be in.
- -lang=name -l name : It describes the language the document is written in. By default it depends on the current locale.
- -sug-mode=mode : The Suggestion Mode.
Example 1: Check a file for spelling errors
aspell -c sample.txt
Sample Text
Example 2: Using aspell to check individual words.
aspell -a
Note: As soon as you run this command, it will wait for user input. Type a word in this mode, press enter, and you’ll see aspell offering spelling suggestions on stdout.
Example 3: Using aspell to check words in bulk. When run, will wait for user input. Add as many words as you want, and when done, press Ctrl+D. Then you’ll see that aspell will display incorrectly spelled words below the input you provided.
Recommended Posts:
- id command in Linux with examples
- du command in Linux with examples
- cp command in Linux with examples
- apt-get command in Linux with Examples
- df command in Linux with Examples
- cut command in Linux with examples
- tty command in Linux with examples
- gcc command in Linux with examples
- until command in Linux with Examples
- more command in Linux with Examples
- w command in Linux with Examples
- sum command in Linux with Examples
- man command in Linux with Examples
- ps command in Linux with Examples
- cc command in Linux with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.