spell checks for misspelled words in each input file. If no file is specified, it checks the standard input. A list of potentially misspelled words is produced on the standard output.
The input to spell is first turned into a list of words
in the manner of the
Words are checked against a local word list and then against a hashed word list. The hashed word list included in this distribution contains virtually no proper names or technical terms. It is assumed that such words are going to be entered into the user's or machine's local word list. Any capitalized word in the hash list must be capitalized in the input document; all other words are matched either capitalized or not. All word forms, including plurals, must be explicitly included in the hash list. This approach prevents the acceptance of nonsense words that can result from the algorithmic combination of legal roots with legal suffixes or prefixes, a phenomenon common to many other spelling checkers.
uses hashfile as the dictionary. hashfile is a hash list produced from a list of words using the
-ioption of spell. To use a list other than the default ROOTDIR/etc/hash, the -doption must be specified. -flocal
uses the file local as a dictionary of local words, given one word per line. If you do not specify this option, the file ROOTDIR/etc/lwords is used as the local dictionary.
appends a history of all misspelled words to the file history. This file may be used by a system administrator for dictionary maintenance or generating a local dictionary.
creates a new hash list file or add words to an existing file, instead of checking for spelling errors. Words to be entered into the dictionary should be specified one per line with no white space on the line. Lines beginning with the # character are ignored as comments. Be very sure that the words you are entering into the hash list are correctly spelled, because there are few things more embarrassing than incorrect words in a spelling dictionary.
produces a longer form of output. For each misspelled word, spell prints three tab-separated columns containing the misspelled word, the line number, and the file name.
forces spell to accept any word that is all uppercase. spell assumes that such words are acronyms.
By default, spell does not sort the output; this maintains the order and number of occurrences of spelling errors. The following command checks for spelling errors, puts them in dictionary order, removes duplicates, and print them in a multi-column format:
spell file | sort -dfu | c
Possible exit status values are:
Failure due to any of the following
Invalid command line option.
The default dictionary file, in hashed form.
The dictionary used to create ROOTDIR/etc/hash.
The default location of the local words file. This need not exist.
Input lines in the text being checked are restricted to a maximum of 100 characters.
x/OPEN Portability Guide 4.0. All UNIX systems. Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.
PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.1 Documentation Build 15.