?? ch05_07.htm
字號(hào):
<html><head><title>Invoking the Shell (UNIX in a Nutshell: System V Edition)</title><link rel="stylesheet" type="text/css" href="../style/style1.css" /><meta name="DC.Creator" content="Arnold Robbins" /><meta name="DC.Format" content="text/xml" scheme="MIME" /><meta name="DC.Language" content="en-US" /><meta name="DC.Publisher" content="O'Reilly & Associates, Inc." /><meta name="DC.Source" scheme="ISBN" content="1-56592-427-4" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="UNIX in a Nutshell: System V Edition" /><meta name="DC.Type" content="Text.Monograph" /></head><body bgcolor="#ffffff"><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home" /><map name="banner-map"><area shape="rect" coords="1,-2,616,66" href="index.htm" alt="Book Title" /><area shape="rect" coords="629,-11,726,25" href="jobjects/fsearch.htm" alt="Search this book" /></map><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch05_06.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228" /><td align="right" valign="top" width="228"><a href="ch05_08.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h2 class="sect1">5.7. Invoking the Shell</h2><p><a name="unut-ch-5-ix-shells-invoking" /><a name="unut-ch-5-ix-csh-c-shell-invoking-shell" /><a name="unut-ch-5-ix-invoking-the-shell" />The C shell command interpreter can be invoked as follows:</p><blockquote><pre class="code">csh [<em class="replaceable"><tt>options</em>] [<em class="replaceable">arguments</tt></em>]</pre></blockquote><p><tt class="literal">csh</tt> executes commands from aterminal or a file. Options <tt class="literal">-n</tt>,<tt class="literal">-v</tt>, and <tt class="literal">-x</tt> are useful when debugging scripts.</p><p>The following list details the options:</p><dl><dt><tt class="literal">-b</tt></dt><dd>Allow the remaining command-line options to be interpreted asoptions to a specified command, rather than as options to <tt class="literal">csh</tt>itself.</p></dd><dt><tt class="literal">-c</tt></dt><dd>Treat the first <em class="emphasis">argument</em></tt> as a string ofcommands to execute.Remaining arguments are available via the <tt class="literal">argv</tt> array.</p></dd><dt><tt class="literal">-e</tt></dt><dd>Exit if a command produces errors.</p></dd><dt><tt class="literal">-f</tt></dt><dd>Fast startup; start <tt class="literal">csh</tt> withoutexecuting <tt class="literal">.cshrc</tt> or <tt class="literal">.login</tt>.</p></dd><dt><tt class="literal">-i</tt></dt><dd>Invoke interactive shell (prompt for input).</p></dd><dt><tt class="literal">-n</tt></dt><dd>Parse commands but do not execute.</p></dd><dt><tt class="literal">-s</tt></dt><dd>Read commands from the standard input.</p></dd><dt><tt class="literal">-t</tt></dt><dd>Exit after executing one command.</p></dd><dt><tt class="literal">-v</tt></dt><dd>Display commands before executing them;expand history substitutions but don'texpand other substitutions (e.g., filename, variable, and command).Same as setting <tt class="literal">verbose</tt>.</p></dd><dt><tt class="literal">-V</tt></dt><dd>Same as <tt class="literal">-v</tt>, but also display <tt class="literal">.cshrc</tt>.</p></dd><dt><tt class="literal">-x</tt></dt><dd>Display commands before executing them, but expand all substitutions.Same as setting <tt class="literal">echo</tt>.<tt class="literal">-x</tt> is often combined with <tt class="literal">-v</tt>. </p></dd><dt><tt class="literal">-X</tt></dt><dd>Same as <tt class="literal">-x</tt>, but also display <tt class="literal">.cshrc</tt>.</p></dd></dl><a name="IXT-5-123025" /><a name="IXT-5-123026" /><a name="IXT-5-123027" /><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch05_06.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="ch05_08.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">5.6. Job Control</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">5.8. Built-in C Shell Commands</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright © 2003</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,88,96" href="../index.htm"><area shape="rect" coords="90,0,165,96" href="../upt/index.htm"><area shape="rect" coords="168,1,253,107" href="../mac/index.htm"><area shape="rect" coords="255,0,335,97" href="../korn/index.htm"><area shape="rect" coords="337,0,415,109" href="../unixnut/index.htm"><area shape="rect" coords="417,0,512,122" href="../sedawk/index.htm"><area shape="rect" coords="514,0,605,105" href="../lunix/index.htm"><area shape="rect" coords="611,2,694,121" href="../vi/index.htm"></map></body></html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -