HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)
s
spell(1) spell(1)
To create a personal spelling list that incorporates the words already present in the default American spel-
ling list file /usr/share/dict/hlista
:
cat /usr/share/dict/hlista | /usr/lbin/spell/hashcheck >tmp1
/usr/lbin/spell/hashmake <addwds >>tmp1
sort -u -o tmp1 tmp1
/usr/lbin/spell/spellin ‘wc -l <tmp1‘ <tmp1 >hlista
To modify the default British spelling list file
/usr/share/dict/hlistb
, replace all occurrences of
hlista with hlistb in the above example.
To add words to the default spelling list, change login to
root, change the current working directory to
/usr/share/dict
and execute the commands listed in the above example.
WARNINGS
The spelling list’s coverage is uneven. When undertaking the use of
spell as a new tool, it may be advis-
able to monitor the output for several months to gather local additions. Typically, these are kept in a
separate local file that is added to the hashed spelling_list via
spellin
, as shown above.
The British spelling feature was developed by an American.
Start-up versions of files
hlista, hlistb, and hstop are available in directory
/usr/newconfig/usr/share/dict
. If these files or a suitable equivalent are not present in direc-
tory
/usr/share/dict,
spell complains:
spell: cannot initialize hash table
spell: cannot initialize hash table
The spell command is likely to be withdrawn from X/Open standards. Applications using this command
might not be portable to other vendors’ systems.
FILES
/usr/share/dict/hlist
[ab] Hashed spelling lists, American and British.
/usr/share/dict/hstop
Hashed stop list.
/var/adm/spellhist
History file.
/usr/lbin/spell/spellprog
Executable program file.
VARIABLES
D_SPELL Your hashed spelling list (default is D_SPELL=/usr/share/dict/hlist
[ab])
H_SPELL Spelling history (default is H_SPELL=/var/adm/spellhist
).
S_SPELL Your hashed stop list (default is S_SPELL=/usr/share/dict/hstop
).
TMPDIR Directory for temporary files; overrides the default /tmp.
SEE ALSO
deroff(1), sed(1), sort(1), tbl(1), tee(1).
STANDARDS CONFORMANCE
spell: SVID2, SVID3, XPG2, XPG3
HP-UX 11i Version 1: September 2005 − 2 − Hewlett-Packard Company Section 1−−937