The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

spell - find spelling errors (LEGACY)

 SYNOPSIS



spell [-bvx][+local_file][file...]

 DESCRIPTION

The spell utility collects words from the named files and looks them up in a spelling list. A word in this context is a series of characters from the set:

[A-Za-z0-9'&.,;?:]

in the POSIX locale, where the first and last characters are alphanumeric. Words that neither occur among nor are derivable (by applying certain inflections, prefixes and suffixes) from words in the spelling list are written to standard output.

Within the file, certain character sequences are treated specially; if the file contains lines that begin with a period or apostrophe or that contain backslashes in any position, the results are unspecified.

 OPTIONS

The spell utility supports the XBD specification, Utility Syntax Guidelines  , except that the +local_file option takes a leading plus sign instead of minus. The following options are supported:

-v
Write all words not literally in the spelling list. Plausible derivations from the words in the spelling list may be indicated.
-b
Check British spelling. Besides preferring centre, colour, programme, speciality, travelled, and so on, this option insists upon -ise in words like standardise.
-x
Write every plausible stem with "=" for each word.
+local_file
Remove words found in local_file from the spell command output. The argument local_file is the name of a user-provided file that contains a sorted list of words, one per line. With this option, the user can specify a set of words that are correct spellings (in addition to spell's own spelling list) for each job.

 OPERANDS

The following operands are supported:
file
A pathname of a text file to check for spelling errors. If no files are named, words are collected from the standard input.

 STDIN

The standard input is a text file used only if no file operands are specified.

 INPUT FILES

The input files are text files.

 ENVIRONMENT VARIABLES

The following environment variables may affect the execution of spell:
LANG
Provide a default value for the internationalisation variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined.
LC_ALL
If set to a non-empty string value, override the values of all the other internationalisation variables.
LC_CTYPE
Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files).
LC_MESSAGES
Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
NLSPATH
Determine the location of message catalogues for the processing of LC_MESSAGES .

 ASYNCHRONOUS EVENTS

Default.

 STDOUT

The standard output consists of single misspelled words separated by newlines. If the -x option is used, words can be preceded by "=".

 STDERR

Used only for diagnostic messages.

 OUTPUT FILES

None.

 EXTENDED DESCRIPTION

None.

 EXIT STATUS

The following exit values are returned:
0
Successful completion.
>0
An error occurred.

 CONSEQUENCES OF ERRORS

Default.

 APPLICATION USAGE

None of the internationalisation variables are required to affect the processing of the input source language. In the POSIX locale, the spell utility recognises English (American or British dialects, depending on the -b option) text.

The unspecified nature of spell when presented files with backslashes or leading periods or leading apostrophes results from its complex attempts to deal with files formatted for troff, tbl and eqn processing (none of which are specified by this specification). Constructs such as .so, .nx, .TS, .EQ, .ig, \s and \f are frequently dealt with in a manner that is most useful for determining spelling errors. However, such algorithms are historically less than perfect and are very difficult to describe precisely.

This utility is marked LEGACY because there is no known technology that can be used to make it recognise general language for user-specified input without providing a complete dictionary along with the input file.

 EXAMPLES

None.

 FUTURE DIRECTIONS

None.

 SEE ALSO

None.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]