⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0278-0279.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>



<HEAD>

<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=01 //-->

<!-- PAGES=0001-0736 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="0277-0277.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0280-0280.html">Next</A></CENTER></P>







<A NAME="PAGENUM-278"><P>Page 278</P></A>





<P>When in the _a mode, ispell will also accept lines of single words prefixed with any of the following:

*, &amp;, @, +, -, ~, #, !, %, or ^. A line starting with

* tells ispell to insert the word into the user's dictionary (similar to

the I command). A line starting with &amp; tells

ispell to insert an all-lowercase version of the word into the user's dictionary (similar to the

U command). A line starting with @ causes ispell to accept this word in the future (similar to the

A command). A line starting with +, followed immediately by

tex or nroff, will cause ispell to parse future input

according the syntax of that formatter. A line consisting solely of a

+ will place ispell in TeX/LaTeX mode (similar to the

_t option) and - returns ispell to nroff/troff mode (but these commands are obsolete). However, string character type is

not changed; the ~ command must be used to do this. A line starting with

~ causes ispell to set internal parameters (in particular, the default string character type) based

on the filename given in the rest of the line. (A file suffix is sufficient, but the period must be included. Instead of a filename

or suffix, a unique name, as listed in the language affix file, may be specified.) However, the formatter parsing is not

changed; the + command must be used to change the formatter. A line prefixed with

# will cause the personal dictionary to be saved.

A line prefixed with ! will turn on terse mode (explained later in this subsection), and a line prefixed with

% will return ispell to normal (non-terse) mode. Any input following the prefix characters

+, -, #, !, or % is ignored, as is any input following

the filename on a ~ line. To allow spell checking of lines beginning with these characters, a line starting with

^ has that character removed before it is passed to the spell checking code. It is recommended that programmatic interfaces prefix every data

line with an up arrow to protect themselves against future changes in

ispell.

</P>



<P>To summarize these:

</P>



<TABLE>



<TR><TD>

*

</TD><TD>

Add to personal dictionary

</TD></TR><TR><TD>

@

</TD><TD>

Accept word, but leave out of dictionary

</TD></TR><TR><TD>

#

</TD><TD>

Save current personal dictionary

</TD></TR><TR><TD>

~

</TD><TD>

Set parameters based on filename

</TD></TR><TR><TD>

+

</TD><TD>

Enter TeX mode

</TD></TR><TR><TD>

-

</TD><TD>

Exit TeX mode

</TD></TR><TR><TD>

!

</TD><TD>

Enter terse mode

</TD></TR><TR><TD>

%

</TD><TD>

Exit terse mode

</TD></TR><TR><TD>

^

</TD><TD>

Spell check rest of line

</TD></TR></TABLE>



<P>In terse mode, ispell will not print lines beginning with

*, +, or _, all of which indicate correct words. This

significantly improves running speed when the driving program is going to ignore correct words anyway.

</P>



<P>The _s option is only valid in conjunction with the

_a or _A OPTIONS, and only on BSD-derived systems. If specified,

ispell will stop itself with a SIGTSTP signal after each line of input. It will not read more input until it receives a

SIGCONT signal. This may be useful for handshaking with certain text editors.

</P>



<P>The _f option is only valid in conjunction with the

_a or _A OPTIONS. If _f is specified, ispell will write its results to

the given file, rather than to standard output.

</P>



<P>The _v option causes ispell to print its current version identification on the standard output and exit. If the switch

is doubled, ispell will also print the OPTIONS that it was compiled with.

</P>



<P>The _c, _e[1-4], and _D OPTIONS of ispell are primarily intended for use by the

munchlist shell script. The _c switch causes a list of words to be read from the standard input. For each word, a list of possible root words and affixes will be written to

the standard output. Some of the root words will be illegal and must be filtered from the output by other means; the

munchlist script does this. As an example, the command

</P>



<!-- CODE SNIP //-->

<PRE>

echo BOTHER | ispell -c

</PRE>

<!-- END CODE SNIP //-->



<P>produces

</P>



<!-- CODE SNIP //-->

<PRE>

BOTHER BOTHE/R BOTH/R

</PRE>

<!-- END CODE SNIP //-->



<P>The _e switch is the reverse of _c; it expands affix flags to produce a list of words. For example, the command

</P>



<!-- CODE SNIP //-->

<PRE>

echo BOTH/R | ispell -e

</PRE>

<!-- END CODE SNIP //-->



<P>produces

</P>



<!-- CODE SNIP //-->

<PRE>

BOTH BOTHER

</PRE>

<!-- END CODE SNIP //-->



<A NAME="PAGENUM-279"><P>Page 279</P></A>





<P>An optional expansion level can also be specified. A level of 1

(_e1) is the same as _e alone. A level of 2 causes the

original root/affix combination to be prepended to the line:

</P>



<!-- CODE SNIP //-->

<PRE>

BOTH/R BOTH BOTHER

</PRE>

<!-- END CODE SNIP //-->



<P>A level of 3 causes multiple lines to be output, one for each generated word, with the original root/affix

combination followed by the word it creates:

</P>



<!-- CODE SNIP //-->

<PRE>

BOTH/R BOTH

BOTH/R BOTHER

</PRE>

<!-- END CODE SNIP //-->



<P>A level of 4 causes a floating-point number to be appended to each of the level 3 lines, giving the ratio between the length

of the root and the total length of all generated words including the root:

</P>



<!-- CODE SNIP //-->

<PRE>

BOTH/R BOTH 2.500000

BOTH/R BOTHER 2.500000

</PRE>

<!-- END CODE SNIP //-->



<P>Finally, the _D flag causes the affix tables from the dictionary file to be dumped to standard output.

</P>



<P>Unless your system administrator has suppressed the feature to save space,

ispell is aware of the correct capitalizations of words in the dictionary and in your personal dictionary. As well as recognizing words that must be capitalized (such

as George) and words that must be all capitals (such as

NASA), it can also handle words with unusual capitalization

(for example, IT-Corp or TeX). If a word is capitalized incorrectly, the list of possibilities will include all acceptable

capitalizations. (More than one capitalization may be acceptable; for example, my dictionary lists both

ITCorp and ITcorp.)

</P>



<P>Normally, this feature will not cause you surprises, but there is one circumstance you need to be aware of. If you use

I to add a word to your dictionary that is at the beginning of a sentence (for example, the first word of this paragraph if

normally were not in the dictionary), it will be marked as &quot;capitalization required.&quot; A subsequent usage of this word without

capitalization will be considered a misspelling by

ispell, and it will suggest the capitalized version. You must then compare the

actual spellings by eye, and then type I to add the uncapitalized variant to your personal dictionary. You can avoid this problem

by using U to add the original word, rather than I.

</P>



<P>The rules for capitalization are as follows:

</P>



<OL>

<LI>          Any word may appear in all capitals, as in headings.

<LI>          Any word that is in the dictionary in all lowercase form may appear either in lowercase or capitalized (as at

the beginning of a sentence).

<LI>          Any word that has unusual capitalization (that is, it contains both cases and there is an uppercase character besides

the first) must appear exactly as in the dictionary, except as permitted by rule 1. If the word is acceptable in all lowercase,

it must appear thus in a dictionary entry.

</OL>



<H3><A NAME="ch01_ 128">

buildhash

</A></H3>



<P>The buildhash program builds hashed dictionary FILES for later use by

ispell. The raw word list (with affix flags) is given

in dict-file, and the affix flags are defined by

affix-file. The hashed output is written to

hash-file. The FORMATS of the two input FILES are described in

ispell(4). The _s (silent) option suppresses the usual status messages that are written to

the standard error device.



<H3><A NAME="ch01_ 129">

munchlist

</A></H3>



<P>The munchlist shell script is used to reduce the size of dictionary FILES, primarily personal dictionary FILES. It is also capable

of combining dictionaries from various sources. The given

FILES are read (standard input if no arguments are given), reduced

to a minimal set of roots and affixes that will match the same list of words, and written to standard output.

</P>



<P>Input for munchlist contains of raw words (such as those from your personal dictionary FILES) or root and affix

combinations (probably generated in earlier

munchlist runs). Each word or root/affix combination must be on a separate line.

</P>



<P>The _D (debug) option leaves temporary FILES around under standard names instead of deleting them, so that the script can

be debugged. Warning: This option can eat up an enormous amount of temporary file space.

</P>



<P>The _v (verbose) option causes progress messages to be reported to

stderr so you won't get nervous that munchlist has hung.

</P>







<P><CENTER>

<a href="0277-0277.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0280-0280.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -