Linux command
ispell 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Check file interactively
ispell [file.txt]
Check from stdin
echo "wrods" | ispell -a
List misspellings
ispell -l < [file.txt]
Use specific dictionary
ispell -d [american] [file.txt]
Check TeX/LaTeX file
ispell -t [document.tex]
Expand affix flags
echo "[BOTH/R]" | ispell -e
说明
ispell is an interactive spell checker. It highlights misspellings and offers corrections for text files. In interactive mode, each misspelled word is displayed with context, and the user can choose a suggested correction, type a replacement, or add the word to a personal dictionary. The tool supports multiple languages and input formats including plain text, TeX/LaTeX, nroff/troff, and HTML. It can run interactively or in pipe mode (-a) for scripting and integration with other programs.
参数
- -a
- Pipe mode for programs.
- -l
- List misspelled words only.
- -d _DICT_
- Use specific dictionary.
- -t
- TeX/LaTeX mode.
- -n
- nroff/troff mode.
- -H
- HTML mode.
- -b
- Create a backup file (.bak) of the input file.
- -x
- Don't create a backup file.
- -B
- Report run-together words as spelling errors.
- -C
- Consider run-together words as legal compounds.
- -M
- Display a one-line mini-menu of options at the bottom of the screen.
- -N
- Suppress the mini-menu.
- -c
- Suggest corrections for words read from stdin.
- -e_1-5_
- Expand affix flags from stdin. Optional level controls output detail.
- -S
- Sort the list of guesses by probable correctness.
- -W _N_
- Specify length of words to consider always legal (default 3).
- -p _FILE_
- Personal dictionary file.
- -L _LINES_
- Number of context lines to display.
FAQ
What is the ispell command used for?
ispell is an interactive spell checker. It highlights misspellings and offers corrections for text files. In interactive mode, each misspelled word is displayed with context, and the user can choose a suggested correction, type a replacement, or add the word to a personal dictionary. The tool supports multiple languages and input formats including plain text, TeX/LaTeX, nroff/troff, and HTML. It can run interactively or in pipe mode (-a) for scripting and integration with other programs.
How do I run a basic ispell example?
Run `ispell [file.txt]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a do in ispell?
Pipe mode for programs.