spell(1) spell(1)
NAME
spell - find spelling errors
SYNOPSIS
spell[ option]...[ +localfile][ file]...
DESCRIPTION
spell checks the spelling of words in an input file against a spelling
list. Words that are not present in the list and which cannot be
derived by using standard English grammar rules (e.g. by adding suit-
able prefixes, suffixes or inflections) are written on the standard
output. If you wish, you can supplement the default English spelling
list with a word list of some other language.
OPTIONS
Caution:
Each individual option must be provided with a minus sign, thus for
example, spell -i -x -v -b, and not spell -ixvb!
-b Checks words from file for British spelling. Besides preferring
centre, colour, programme, speciality, travelled, etc., this
option considers -ise in words such as standardise to be the
correct spelling.
-b not specified:
Words from file are checked for correct American spelling.
-i The troff text insertion requests .so and .nx are always ignored.
-l Forces spell to follow the chains of all files included as a
result of the troff text insertion requests .so and .nx.
If -l is not specified, spell follows chains of included files
only if the path names of such files do not begin with /usr/lib.
-v Prints all words from file that are not literally in the spelling
list. The spelling list is located in the file
/usr/ucblib/dict/words.
Plausible derivations from the words in the spelling list are
identified as follows:
+prefix word
+suffix word
-x Every plausible stem is printed with = for each word in file.
Page 1 Reliant UNIX 5.44 Printed 11/98
spell(1) spell(1)
+localfile
Words found in localfile are removed from spell's output. spell
considers the words in this file to have acceptable spellings.
localfile is a user-provided file containing a list of words
sorted by ASCII codes (one word per line). You will need to have
read permission for localfile (see chmod).
+localfile not specified:
spell only uses the spellings in /usr/ucblib/dict/words.
file Name of the file to be checked for spelling errors. Read permis-
sion is required for file (see chmod).
file not specified:
spell reads from standard input.
spell ignores most troff, tbl, and eqn constructions in the
input.
ERROR MESSAGES
spell cannot read localfile
Either the named localfile does not exist, or you do not have write
permission for it.
ENVIRONMENT VARIABLES
Alternate auxiliary files (spelling lists, stop list, history file)
may be specified by using these environment variables. The default
values are as follows:
DSPELL=/usr/share/lib/spell/hlist[ab]
Contains the hashed spelling list.
SSPELL=/usr/share/lib/spell/hstop
Contains the hashed stop list.
HSPELL=/var/adm/spellhist
Contains the history file.
LOCALE
The LCMESSAGES environment variable governs the language in which
message texts are displayed. If LCMESSAGES is undefined or is defined
as the null string, it defaults to the value of LANG. If LANG is like-
wise undefined or null, the system acts as if it were not internation-
alized.
The LCALL environment variable governs the entire locale. LCALL
takes precedence over all the other environment variables which affect
internationalization.
Page 2 Reliant UNIX 5.44 Printed 11/98
spell(1) spell(1)
EXAMPLES
On the basis of the words in list, check the file colors for
misspelled words:
$ cat colors
bleu yellow redd grien purple black wite orrange
$ cat list
black
blue
green
orange
purple
red
white
yellow
$ spell -v +list colors
bleu
grien
orrange
redd
wite
The output shows all words in colors that are not in list.
FILES
/usr/lib/spell/spellprog
Executable program used by spell.
/usr/share/lib/spell/hlist[ab]
Hashed spelling lists, American and British. The spelling lists
are based on many sources, and while less systematic than an
ordinary dictionary, is also more effective with respect to
proper names and popular technical words. Coverage of the spe-
cialized vocabularies of biology, medicine and chemistry is lim-
ited.
/usr/share/lib/spell/hstop
Hashed stop list. The stop list filters out misspellings (e.g.
thier=thy-y+ier) that would otherwise pass.
/usr/ucblib/dict/words
Default spelling list used when no localfile is specified.
/var/adm/spellhist
History file in which copies of all output are accumulated.
The above files can be extended and maintained with the commands spel-
lin, hashmake and hashcheck (see the corresponding descriptions).
Page 3 Reliant UNIX 5.44 Printed 11/98
spell(1) spell(1)
SEE ALSO
deroff(1), hashmake(1), hashcheck(1), spellin(1), sed(1), sort(1),
tee(1), eqn(1M), nroff(1M), tbl(1M), troff(1M).
Page 4 Reliant UNIX 5.44 Printed 11/98