亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? _chapter 13.htm

?? linux、unix初學者的必讀書籍 詳細講述了shell編程方法與技巧
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Chapter 13</title>
<link rel="stylesheet" type="text/css" href="docsafari.css">
<link rel="stylesheet" type="text/css" href="style.css">
</head>

<body><table width="100%" border="1" bgcolor="#EBEBFF"><tr><td width="5%" align="left" valign="middle"><a href="_chapter 12.htm"><img src="Larrow.gif" width="17" height="19" border="0"></a></td><td align="center" valign="middle"><a class="docLink" href="Front matter.htm">CONTENTS</a></td><td width="5%" align="right" valign="middle"><a href="Appendix A.htm"><img src="Rarrow.gif" width="17" height="19" border="0"></a></td></tr></table>


<h2 class="docChapterTitle">Chapter 13. The Interactive TC Shell</h2><ul><li>&nbsp;<a class="docLink" href="#ch13lev1sec1">13.1 Introduction</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec2">13.2 The TC Shell Environment</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec3">13.3 Command Line Shortcuts</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec4">13.4 Job Control</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec5">13.5 Metacharacters</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec6">13.6 Redirection and Pipes</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec7">13.7 Variables</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec8">13.8 Arrays</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec9">13.9 Special Variables and Modifiers</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec10">13.10 Command Substitution</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec11">13.11 Quoting</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec12">13.12 Built-In Commands</a></li>
<li>&nbsp;<a class="docLink" href="#ch13lev1sec13">TC SHELL LAB EXERCISES</a></li>
</ul>
<p class="docText">
<img alt="graphics/ch13.gif" src="ch13.gif" border="0" width="500" height="411"></p>
<h3 class="docSection1Title" id="ch13lev1sec1">13.1 Introduction</h3>
<p class="docText">An interactive shell is one in which the standard input,
output, and errors are connected to a terminal. When using the TC<span id="ENB13-1"><a class="docLink" href="#EN13-1"><sup>[1]</sup></a></span>
shell (<span class="docEmphasis">tcsh</span>) interactively, you will type
commands at the <span class="docEmphasis">tcsh</span> prompt and wait for a
response. The TC shell is a program that starts up at login and interprets
commands. It is a public domain enhanced version of its predecessor, the
Berkeley UNIX C shell. Added features include command line editing, fancy
prompts, programmable completions (filenames, commands, and variables), spelling
correction, etc.</p>
<p class="docText">The primary <span class="docEmphasis">tcsh</span> source
distribution is at
<a class="docLink" href="http://ftp.astron.com" target="_blank">ftp.astron.com</a>,
also <a class="docLink" href="http://ftp.gw.com" target="_blank">ftp.gw.com</a>,
and <a class="docLink" href="http://ftp.primate.wisc.edu" target="_blank">
ftp.primate.wisc.edu</a>.<span id="ENB13-2"><a class="docLink" href="#EN13-2"><sup>[2]</sup></a></span>
Although <span class="docEmphasis">tcsh</span> is included in most Linux
distributions, it can be ported to a number of operating systems, including
Solaris, Windows NT, HP-UX, QNX, etc.</p>
<p class="docText">This chapter focuses on how to use the TC shell interactively
and how to set up your initial working environment. The enhancements over the
Berkeley C shell are extensive when working with the shell interactively, as you
will see in this chapter. However, when used as a programming language,
<span class="docEmphasis">tcsh</span> and <span class="docEmphasis">csh</span>
are practically identical. Please refer to
<a class="docLink" href="_chapter 10.htm">Chapter 10</a> for
script writing with <span class="docEmphasis">tcsh.</span> The only change will
be that where you see <span class="docEmphasis">/bin/csh,</span> you will use
<span class="docEmphasis">/bin/tcsh.</span></p>
<h4 class="docSection2Title" id="ch13lev2sec1">13.1.1 Versions of <span class="docEmphasis">tcsh</span></h4>
<p class="docText">To find out what version of <span class="docEmphasis">tcsh</span>
you are using, type at the shell prompt:</p>
<pre>which tcsh
</pre>
<p class="docText">To tell you in what directory <span class="docEmphasis">tcsh</span>
is installed (normally <span class="docEmphasis">/bin</span>), and to print the
version information, type the following:</p>
<pre>/directory_path/tcsh -c 'echo $version'
</pre>
<h5 id="ch13list01" class="docExampleTitle">Example 13.1 </h5>
<pre>1   <span class="docEmphStrong">which tcsh</span>
    <span class="docEmphasis">/bin/tcsh</span>

2   <span class="docEmphStrong">/bin/tcsh -c</span> '<span class="docEmphStrong">echo $version</span>'
    <span class="docEmphasis">tcsh 6.09.09 (Astron) 1998-08-16 (sparc-sun-solaris) options</span>
    <span class="docEmphasis">8b,nls,dl,al,rh,color</span>
</pre>
<h4 class="docSection2Title" id="ch13lev2sec2">13.1.2 Startup</h4>
<p class="docText">Before the TC shell displays a prompt, it is preceded by a
number of processes. See <a class="docLink" href="#ch13fig01">Figure 13.1</a>.</p>
<center>
<h5 id="ch13fig01" class="docFigureTitle">Figure 13.1. System startup and the TC shell.</h5>
<p class="docText">
<img alt="graphics/13fig01.gif" src="13fig01.gif" border="0" width="456" height="504"></p>
</center>
<p class="docText">After the system boots, the first process to run is called
<span class="docEmphasis">init,</span> process identification number (PID) 1. It
spawns a <span class="docEmphasis">getty</span> process. These processes are
responsible for opening up the terminal ports, for providing a place where input
comes from (<span class="docEmphasis">stdin)</span> and where standard output (<span class="docEmphasis">stdout</span>)
and error (<span class="docEmphasis">stderr</span>) go, and for putting a login
prompt on your screen. After the user types his user name, the
<span class="docEmphasis">/bin/login</span> program is executed. The login
program prompts for a password, encrypts and verifies your password, sets up an
initial working environment, and then initiates the shell,
<span class="docEmphasis">/bin/tcsh.</span> The TC shell looks in the
<span class="docEmphasis">/etc</span> directory for a system startup file called
<span class="docEmphasis">/etc/csh.cshrc</span> and <span class="docEmphasis">
/etc/csh.login</span> (if it exists). It then looks in the user's home directory
for a file called <span class="docEmphasis">~/.tcshrc,</span> another
initialization file used to customize the <span class="docEmphasis">tcsh</span>
environment. If that file is not found, it will look for another file that does
the same job, called <span class="docEmphasis">~/.cshrc</span> (normally invoked
when running <span class="docEmphasis">csh</span>). After executing commands in
the <span class="docEmphasis">.tcshrc</span> file (or <span class="docEmphasis">
.cshrc</span>), it will execute the history file, commonly called
<span class="docEmphasis">.history.</span> Then commands in the
<span class="docEmphasis">~/.login</span> file are executed, and finally the
<span class="docEmphasis">.cshdirs</span> file is executed. Each of these files
will be explained in &quot;<a class="docLink" href="#ch13lev1sec2">The
TC Shell Environment</a>&quot;.<span id="ENB13-3"><a class="docLink" href="#EN13-3"><sup>[3]</sup></a></span></p>
<p class="docText">The <span class="docEmphasis">/etc/csh.cshrc</span> and
<span class="docEmphasis">~/.tcshrc</span> files will be executed every time a
new TC shell is started. The <span class="docEmphasis">.login</span> file is
executed only once when the user logs on, and also contains commands and
variables to initialize the user's environment. After executing commands from
all the startup files, the prompt (&gt; is the default) appears on your screen and
the <span class="docEmphasis">tcsh</span> awaits commands. See
<a class="docLink" href="#ch13fig02">Figure 13.2</a>.</p>
<center>
<h5 id="ch13fig02" class="docFigureTitle">Figure 13.2. If any of these initialization files
exist, they are sourced in this sequence.</h5>
<p class="docText">
<img alt="graphics/13fig02.gif" src="13fig02.gif" border="0" width="379" height="478"></p>
</center>
<p class="docText">When logging out, the user presses Control-D or will be
automatically logged out if the <span class="docEmphasis">autologout</span>
shell variable has been set. Before logging off, the shell looks for a file
called <span class="docEmphasis">/etc/csh.logout</span> or
<span class="docEmphasis">~/.logout</span> in the home directory and if either
is located, its commands will be executed. The <span class="docEmphasis">.logout</span>
file normally contains commands to clean up temporary files, append data to
logfiles, wish the user a good day, etc.</p>

<h3 class="docSection1Title" id="ch13lev1sec2">13.2 The TC Shell Environment</h3>
<h4 class="docSection2Title" id="ch13lev2sec3">13.2.1 Initialization Files</h4>
<p class="docText">After the <span class="docEmphasis">tcsh</span> program
starts, it is programmed to execute a systemwide startup file,
<span class="docEmphasis">/etc/csh.cshrc,</span> and then two shell
initialization files in the user's home directory: the <span class="docEmphasis">
.tcshrc</span> file and then the <span class="docEmphasis">.login</span> file.
These files allow users to initialize their own environment.</p>
<h5 id="ch13list02" class="docExampleTitle">Example 13.2 </h5>
<pre># /etc/csh.cshrc
# <span class="docEmphasis">Systemwide environment and startup programs for csh users</span>

1  if ($?PATH) then

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品免费av| 五月综合激情网| 亚洲五码中文字幕| 天堂久久久久va久久久久| 国产一区二区三区免费在线观看 | 午夜伦欧美伦电影理论片| 国产一区二区三区av电影| 欧美系列日韩一区| 亚洲国产精品成人综合 | 国产精品久久久99| 日本不卡免费在线视频| 99精品偷自拍| 国产偷国产偷亚洲高清人白洁| 亚洲成人777| 欧美一区在线视频| 亚洲日本成人在线观看| 国产精品一区二区果冻传媒| 欧美吻胸吃奶大尺度电影| 久久久久久久久99精品| 一区二区三区在线观看欧美| 奇米亚洲午夜久久精品| 一本久久a久久精品亚洲| 制服丝袜在线91| 日韩不卡一区二区| 色婷婷综合在线| 精品成人a区在线观看| 午夜免费欧美电影| 99久久精品一区| 久久女同性恋中文字幕| 另类小说图片综合网| 欧美专区亚洲专区| 亚洲色欲色欲www| 国产成人精品影院| 国产网站一区二区| 国产精品18久久久久久久网站| 制服.丝袜.亚洲.中文.综合| 亚洲日本在线a| 懂色av中文字幕一区二区三区| 久久久三级国产网站| 国产黄人亚洲片| 国产日产亚洲精品系列| 国产福利一区在线| 久久精品亚洲精品国产欧美kt∨| 日韩综合小视频| 欧美日韩视频在线观看一区二区三区 | 亚洲一区在线观看网站| 一本一道综合狠狠老| 亚洲靠逼com| 岛国av在线一区| 久久久99精品久久| 国产精品一级片| 亚洲国产精品t66y| 欧洲精品一区二区三区在线观看| 亚洲三级电影网站| 色婷婷av一区二区三区软件| 亚洲成人免费av| 精品国产在天天线2019| 成人免费视频网站在线观看| 国产日韩精品一区| 色欧美片视频在线观看在线视频| 天堂久久久久va久久久久| 国产亚洲欧美日韩日本| 99久久综合精品| 亚洲一区二区三区四区在线观看| 在线观看日韩电影| 视频在线观看国产精品| 久久香蕉国产线看观看99| 国产高清在线观看免费不卡| 精品播放一区二区| 99re这里只有精品首页| 伊人开心综合网| 欧美日韩美少妇| 精品一区二区三区在线播放| 国产午夜久久久久| 一本久久a久久免费精品不卡| 一级日本不卡的影视| 欧美日韩mp4| 国产精品资源在线观看| 中文无字幕一区二区三区| 成人a级免费电影| 亚洲444eee在线观看| 久久久精品国产免大香伊| 色综合久久久久久久久久久| 日本网站在线观看一区二区三区| 欧美激情一区不卡| 欧美主播一区二区三区美女| 麻豆一区二区三| 亚洲欧洲日产国码二区| 在线播放日韩导航| 成人激情电影免费在线观看| 午夜在线电影亚洲一区| 国产精品乱子久久久久| 日韩视频一区二区三区在线播放| 不卡一区二区在线| 国产伦精品一区二区三区视频青涩| 亚洲国产精品久久人人爱| 国产午夜精品一区二区| 日韩一区和二区| 欧美午夜在线观看| 99re在线精品| 国产91精品一区二区麻豆网站| 麻豆高清免费国产一区| 亚洲一区视频在线观看视频| 国产精品毛片无遮挡高清| 国产亚洲欧美色| 精品国产电影一区二区| 欧美一区二区三区小说| 欧洲精品一区二区三区在线观看| 波多野结衣亚洲| 成人精品视频一区二区三区| 国产一区二区电影| 国产一区二区毛片| 国产一区二区三区不卡在线观看 | 欧美久久久久久久久中文字幕| 色综合婷婷久久| 91麻豆国产福利在线观看| gogo大胆日本视频一区| 97久久久精品综合88久久| 成人性生交大片| 成人av在线影院| 国产91丝袜在线18| 成人性色生活片免费看爆迷你毛片| 国产成人在线视频网站| 久久99国产精品尤物| 久久不见久久见免费视频7| 亚洲国产欧美一区二区三区丁香婷| 中文字幕永久在线不卡| 国产欧美精品一区aⅴ影院| 久久综合网色—综合色88| 26uuu亚洲| 久久久亚洲精华液精华液精华液| 久久久亚洲高清| 亚洲国产精品激情在线观看| 欧美国产亚洲另类动漫| 国产精品久久久久久久久图文区| 久久久久久久国产精品影院| 亚洲精品在线观看网站| 久久丝袜美腿综合| 国产精品久久久99| 亚洲综合成人在线视频| 热久久一区二区| 久久国产精品99久久人人澡| 国产一二精品视频| 91尤物视频在线观看| 91久久精品日日躁夜夜躁欧美| 91在线视频在线| 宅男噜噜噜66一区二区66| 久久久一区二区三区| 亚洲欧洲国产专区| 水野朝阳av一区二区三区| 久久精品国产一区二区三| 久久国产欧美日韩精品| 99久久er热在这里只有精品15 | 亚洲愉拍自拍另类高清精品| 一区二区三区加勒比av| 尤物在线观看一区| 日韩精品一二三区| 国产福利不卡视频| 欧美国产在线观看| 亚洲综合在线五月| 亚洲国产另类av| 蜜桃免费网站一区二区三区| 不卡一区二区三区四区| 欧美高清性hdvideosex| 久久久久88色偷偷免费| 亚洲国产精品欧美一二99| 高清shemale亚洲人妖| 91精品国产日韩91久久久久久| 综合久久综合久久| 国产在线精品免费| 91精品综合久久久久久| 亚洲另类中文字| 国产黄人亚洲片| 日韩亚洲欧美在线| 亚洲国产精品欧美一二99| heyzo一本久久综合| 久久久欧美精品sm网站| 免费欧美在线视频| 欧美日韩小视频| 亚洲黄色av一区| 99久久er热在这里只有精品66| 久久久久国产精品麻豆ai换脸| 日韩电影在线一区二区三区| 在线观看网站黄不卡| 国产精品国产三级国产有无不卡 | 欧美在线看片a免费观看| 国产欧美精品一区二区色综合| 青青草国产精品亚洲专区无| 欧美亚洲一区二区在线| 亚洲丝袜自拍清纯另类| 国产成人在线视频播放| 久久久久久久久岛国免费| 久久成人免费网站| 精品少妇一区二区三区免费观看| 婷婷久久综合九色综合伊人色| 精品视频123区在线观看| 亚洲一二三四区不卡| 欧美中文字幕一区| 亚洲三级理论片| 色哦色哦哦色天天综合|