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

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

?? _chapter 9.htm

?? linux、unix初學者的必讀書籍 詳細講述了shell編程方法與技巧
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
<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 9</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 8.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="_chapter 10.htm"><img src="Rarrow.gif" width="17" height="19" border="0"></a></td></tr></table>

<h2 class="docChapterTitle">Chapter 9. The C Shell</h2><ul><li>&nbsp;<a class="docLink" href="#ch09lev1sec1">9.1 The Interactive C Shell</a></li>
<li>&nbsp;<a class="docLink" href="#ch09lev1sec2">9.2 Programming with the C Shell</a></li>
<li>&nbsp;<a class="docLink" href="#ch09lev1sec3">C SHELL LAB EXERCISES</a></li>
</ul>

<p class="docText">
<img alt="graphics/ch09.gif" src="ch09.gif" border="0" width="500" height="805"></p>
<h3 class="docSection1Title" id="ch09lev1sec1">9.1 The Interactive C Shell</h3>
<p class="docText">Before the C shell displays a prompt, it is preceded by a 
number of processes. See <a class="docLink" href="#ch09fig01">Figure 9.1</a>.</p>
<center>
<h5 id="ch09fig01" class="docFigureTitle">Figure 9.1. System startup and the C shell.</h5>
<p class="docText">
<img alt="graphics/09fig01.gif" src="09fig01.gif" border="0" width="430" height="486"></p>
</center>
<h4 class="docSection2Title" id="ch09lev2sec1">9.1.1 Startup</h4>
<p class="docText">After the system boots, the first process to run is called
<span class="docEmphasis">init;</span> it is assigned process identification 
number (PID) 1. It gets instructions from a file called
<span class="docEmphasis">inittab</span> (System V) or spawns a
<span class="docEmphasis">getty</span> process (BSD). These processes are 
responsible for opening up the terminal ports, for providing a place where input 
comes from (<span class="docEmphasis">stdin),</span> 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. The <span class="docEmphasis">/bin/login</span> program 
is then 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/csh.</span> The C shell 
looks in the user's home directory for a file called <span class="docEmphasis">.cshrc,</span> 
an initialization file allowing you to customize the C shell environment you 
will be working in. After executing commands in the <span class="docEmphasis">.cshrc</span> 
file, commands in the <span class="docEmphasis">.login</span> file are executed. 
The .<span class="docEmphasis">cshrc</span> file will be executed every time a 
new C 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 
those files, the percent sign prompt appears on your screen and the C shell 
awaits commands.</p>
<h4 class="docSection2Title" id="ch09lev2sec2">9.1.2 The Environment</h4>
<p class="docText"><b>Initialization Files.</b> After the
<span class="docEmphasis">csh</span> program starts, it is programmed to execute 
two files in the user's home directory: the <span class="docEmphasis">.cshrc</span> 
file and the <span class="docEmphasis">.login</span> file. These files allow 
users to initialize their own environments.</p>
<p class="docText"><span class="docEmphStrong">The .<span class="docEmphasis">cshrc</span> 
File.</span> The .<span class="docEmphasis">cshrc</span> file contains C shell 
variable settings and is executed every time a <span class="docEmphasis">csh</span> 
subshell is started. Aliases and history are normally set here.</p>
<h5 id="ch09list01" class="docExampleTitle">Example 9.1 </h5>
<pre>(The .cshrc File)
1   if ( $?prompt ) then
2      set prompt = &quot;\! stardust &gt; &quot;
3      set history = 32
4      set savehist = 5
5      set noclobber
6      set filec fignore = ( .o )
7      set cdpath = ( /home/jody/ellie/bin /usr/local/bin /usr/bin )
8      set ignoreeof
9      alias m more
       alias status 'date;du -s'
       alias cd 'cd \!*;set prompt = &quot;\! &lt;$cwd&gt; &quot;'
    endif
</pre>

<table cellSpacing="0" width="90%" border="1" align="center">
  <tr>
    <td>
    <h2 class="docSidebarTitle">EXPLANATION</h2>
    <span style="FONT-WEIGHT: bold">
    <ol class="docList" type="1">
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">If the prompt has been set (<span class="docEmphasis">$?prompt</span>), 
      the shell is running interactively; i.e., it is not running in a script.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The primary prompt is set to the number of the current 
      history event, the name <span class="docEmphasis">stardust,</span> and a &gt; 
      character. This will change the % prompt, the default.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The <span class="docEmphasis">history</span> variable 
      is set to <span class="docEmphasis">32</span>. This controls the number of 
      history events that will appear on the screen. The last 32 commands you 
      entered will be displayed when you type <span class="docEmphasis">history</span> 
      (see &quot;<a class="docLink" href="_chapter 10.htm#ch10lev2sec6">Command 
      Line History</a>&quot;).</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">Normally, when you log out, the history list is 
      cleared. The <span class="docEmphasis">savehist</span> variable allows you 
      to save a specified number of commands from the end of the history list. 
      In this example, the last 5 commands will be saved in a file in your home 
      directory, the <span class="docEmphasis">.history</span> file, so that 
      when you log in again, the shell can check to see if that file exists and 
      put the history lines saved at the top of the new history list.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The <span class="docEmphasis">noclobber</span> variable 
      is set to protect the user from inadvertently removing files when using 
      redirection. For example, <span class="docEmphasis">sort myfile &gt; myfile</span> 
      will destroy <span class="docEmphasis">myfile.</span> With
      <span class="docEmphasis">noclobber</span> set, the message
      <span class="docEmphasis">file exists</span> will appear on the screen.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The <span class="docEmphasis">filec</span> variable is 
      used for filename completion so that you only need to type the first 
      number of significant characters in a filename, press the ESC key, and the 
      shell will complete the rest of the filename. By pressing ^D (Control-D) 
      when typing in the filename, the C shell will display a list of files that 
      match that string. The <span class="docEmphasis">fignore</span> variable 
      allows you to exclude files that you do not want affected by filename 
      completion. In this case, all the <span class="docEmphasis">.o</span> 
      filenames (object files) will not be affected by <span class="docEmphasis">
      filec,</span> even though <span class="docEmphasis">filec</span> is set 
      (see &quot;Filename Completion: The filec Variable&quot; on page 355).</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The <span class="docEmphasis">cdpath</span> variable is 
      assigned a list of path elements. When changing directories, if you 
      specify just the directory name, and that directory is not a subdirectory 
      directly below the current working directory, the shell will search the
      <span class="docEmphasis">cdpath</span> directory entries to see if it can 
      find the directory in any of those locations and then will change the 
      directory.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The <span class="docEmphasis">ignoreeof</span> variable 
      prevents you from logging out with ^D. UNIX utilities that accept input 
      from the keyboard, such as the <span class="docEmphasis">mail</span> 
      program, are terminated by pressing ^D. Often, on a slow system, the user 
      will be tempted to press ^D more than once. The first time, the
      <span class="docEmphasis">mail</span> program would be terminated, the 
      second time, the user is logged out. By setting <span class="docEmphasis">
      ignoreeof,</span> you are required to type <span class="docEmphasis">
      logout</span> to log out.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The <span class="docEmphasis">aliases</span> are set to 
      give a shorthand notation for a single command or group of commands. Now 
      when you type the alias, the command(s) assigned to it will be executed. 
      The alias for the <span class="docEmphasis">more</span> command is
      <span class="docEmphasis">m.</span> Every time you type
      <span class="docEmphasis">m,</span> the <span class="docEmphasis">more</span> 
      command is executed. The <span class="docEmphasis">status</span> alias 
      prints the date and a summary of the user's disk usage. The
      <span class="docEmphasis">cd</span> alias creates a new prompt every time 
      the user changes directory. The new prompt will contain the number of the 
      current history event (\<span class="docEmphasis">!*</span>) and the 
      current working directory, <span class="docEmphasis">$cwd</span> 
      surrounded by &lt; &gt;. (see &quot;<a class="docLink" href="#ch09lev2sec5">Aliases</a>&quot;).</span></li>
    </ol>
    </span></td>
  </tr>
</table>

<p class="docText"><span class="docEmphStrong">The <span class="docEmphasis">
.login</span> File.</span> The <span class="docEmphasis">.login</span> file is 
executed one time when you first log in. It normally contains environment 
variables and terminal settings. It is the file where window applications are 
usually started. Since environment variables are inherited by processes spawned 
from this shell and only need to be set once, and terminal settings do not have 
to be reset for every process, those settings belong in the
<span class="docEmphasis">login</span> file.</p>
<h5 id="ch09list02" class="docExampleTitle">Example 9.2 </h5>
<pre>(The .login File)
1   stty -istrip
2   stty erase ^H
3   <span class="docEmphasis">#</span>
    <span class="docEmphasis"># If possible start the windows system.</span>
    <span class="docEmphasis"># Give a user a chance to bail out</span>
    <span class="docEmphasis">#</span>
4   if ( 'tty' == &quot;/dev/console&quot; ) then
5       if ( $TERM == &quot;sun&quot; || $TERM == &quot;AT386&quot; ) then
6              if ( ${?OPENWINHOME} == 0 ) then
7                   setenv OPENWINHOME /usr/openwin
8              endif
           echo &quot;&quot;
9          echo -n &quot;Starting OpenWindows in 5 seconds\
               (type Control-C to interrupt)&quot;
10         sleep 5
           echo &quot;&quot;
11         $OPENWINHOME/bin/openwin
12         clear
13         logout
       endif
    endif
</pre>

<table cellSpacing="0" width="90%" border="1" align="center">
  <tr>
    <td>
    <h2 class="docSidebarTitle">EXPLANATION</h2>
    <span style="FONT-WEIGHT: bold">
    <ol class="docList" type="1">
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The <span class="docEmphasis">stty</span> command sets 
      options for the terminal. Input characters will not be stripped to seven 
      bits if <span class="docEmphasis">-istrip</span> is an option.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The <span class="docEmphasis">stty</span> command sets 
      the Backspace key (Control-H) to erase characters.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">Any line beginning with a <span class="docEmphasis">#</span> 
      is a comment. It is not an executable statement.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">If the current terminal window (<span class="docEmphasis">tty</span>) 
      is the console (<span class="docEmphasis">/dev/console</span>), the next 
      line is executed; otherwise, program control goes to the last
      <span class="docEmphasis">endif.</span></span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">If the value of the <span class="docEmphasis">TERM</span> 
      variable is equal to sun or <span class="docEmphasis">AT386,</span> then 
      the next line is executed.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">If the <span class="docEmphasis">OPENWINHOME</span> 
      environment variable has not been set (<span class="docEmphasis">$?</span> 
      is <span class="docEmphasis">0</span> if not set, and
      <span class="docEmphasis">1</span> if set), the next line is executed.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The <span class="docEmphasis">OPENWINHOME</span> 
      environment variable is set to <span class="docEmphasis">/usr/openwin.</span></span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">This <span class="docEmphasis">endif</span> ends the
      <span class="docEmphasis">if</span> on line 5.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The line is displayed on the screen, letting the user 
      know that <span class="docEmphasis">OpenWindows</span> is starting unless 
      Control-C is typed within the next <span class="docEmphasis">5</span> 
      seconds.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The program sleeps (stops execution) for
      <span class="docEmphasis">5</span> seconds.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">The <span class="docEmphasis">openwin</span> program is 
      started. A set of terminal windows (shell and command tool windows and a 
      console window) will appear on the screen.</span></li>
      <li><span style="FONT-WEIGHT: normal">
      <p class="docList">After closing windows, the screen will be cleared.</span></li>
      <li><span style="FONT-WEIGHT: normal">

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆精品一区二区av白丝在线| 国产激情视频一区二区在线观看| 麻豆精品在线播放| 色哟哟国产精品免费观看| 欧美成人福利视频| 亚洲在线观看免费| 成人免费观看av| 欧美一区二区三区在线视频| 亚洲婷婷在线视频| 国产精品综合视频| 欧美一区二区三区在线看| 亚洲最色的网站| 国产成人自拍高清视频在线免费播放| 6080亚洲精品一区二区| 一区二区免费看| 成人国产在线观看| 欧美高清在线视频| 精品系列免费在线观看| 日韩免费观看2025年上映的电影| 亚洲国产精品久久人人爱蜜臀 | 精品无人码麻豆乱码1区2区| 欧美日韩精品一区二区三区| 亚洲欧美日韩中文播放| 粉嫩av一区二区三区| 久久嫩草精品久久久精品| 麻豆成人免费电影| 欧美一激情一区二区三区| 亚洲成人免费av| 欧美久久一二区| 日韩av高清在线观看| 欧美精品三级日韩久久| 丝袜诱惑亚洲看片| 欧美男人的天堂一二区| 日韩精品国产欧美| 欧美一区二区黄| 精品亚洲国产成人av制服丝袜| 日韩片之四级片| 经典三级一区二区| 国产亚洲精品超碰| 波多野结衣中文字幕一区| 国产精品每日更新在线播放网址| 成人小视频在线| 1024成人网| 欧洲视频一区二区| 视频一区二区中文字幕| 欧美大黄免费观看| 国模大尺度一区二区三区| 国产婷婷精品av在线| 97精品久久久久中文字幕| 一区二区三区视频在线观看| 在线视频一区二区三区| 日av在线不卡| 中文字幕电影一区| 欧美视频在线播放| 久久电影网站中文字幕| 中文字幕乱码日本亚洲一区二区 | 884aa四虎影成人精品一区| 蜜臀久久99精品久久久久宅男| 久久综合久久综合久久综合| 波多野结衣精品在线| 午夜成人免费视频| 欧美精品一区二区高清在线观看| 成人一区二区在线观看| 香蕉成人伊视频在线观看| 久久久91精品国产一区二区三区| 不卡的电影网站| 免费成人av在线播放| 欧美激情综合五月色丁香小说| 91国产免费看| 国产精品18久久久久| 亚洲自拍偷拍av| 精品嫩草影院久久| 欧美中文字幕亚洲一区二区va在线 | 99精品国产99久久久久久白柏| 亚洲高清免费在线| 国产精品美女一区二区| 欧美一区二区在线看| 色综合久久久久综合| 久久99精品国产麻豆婷婷 | 亚洲国产精品精华液2区45| 欧美体内she精高潮| 丁香六月久久综合狠狠色| 日韩av不卡一区二区| 亚洲日本欧美天堂| 日本一区二区三级电影在线观看 | 蜜臀av国产精品久久久久| 亚洲欧洲精品一区二区三区不卡| 日韩一区二区麻豆国产| 色婷婷香蕉在线一区二区| 久久99久久久欧美国产| 亚洲午夜影视影院在线观看| 2024国产精品| 日韩一区二区中文字幕| 欧美亚洲国产一区在线观看网站| 成人aaaa免费全部观看| 国产在线精品视频| 日韩av一二三| 日韩av网站免费在线| 亚洲二区在线观看| 亚洲最大成人网4388xx| 中文字幕亚洲区| 欧美国产一区在线| 亚洲精品一区二区精华| 日韩女优视频免费观看| 日韩欧美国产麻豆| 666欧美在线视频| 91精品在线麻豆| 欧美亚洲自拍偷拍| 在线看日本不卡| 欧美日韩国产色站一区二区三区| 一本色道久久综合亚洲aⅴ蜜桃 | 国产一区二区福利| 麻豆精品视频在线观看视频| 日韩高清一级片| 免费视频一区二区| 久久激情五月婷婷| 激情综合色综合久久| 黑人巨大精品欧美一区| 国产精品一二三四| 成人免费高清在线观看| caoporm超碰国产精品| 91亚洲精品久久久蜜桃| 色国产精品一区在线观看| 91九色02白丝porn| 欧美揉bbbbb揉bbbbb| 欧美二区三区的天堂| 5月丁香婷婷综合| ww亚洲ww在线观看国产| 国产亚洲成年网址在线观看| 自拍av一区二区三区| 一区二区三区四区在线免费观看| 一区二区三区日本| 丝袜美腿成人在线| 国产乱码精品1区2区3区| 成人在线一区二区三区| 在线视频欧美精品| 日韩久久久精品| 国产精品乱人伦中文| 一区二区三区四区乱视频| 香蕉久久一区二区不卡无毒影院 | 久久精品一区蜜桃臀影院| 国产精品视频你懂的| 亚洲一区免费在线观看| 乱中年女人伦av一区二区| 国产精品综合视频| 欧美亚洲免费在线一区| 精品久久久久久无| 亚洲日穴在线视频| 久久精品72免费观看| 91色乱码一区二区三区| 91精品国产欧美日韩| 日本一区二区三区国色天香| 午夜亚洲福利老司机| 国产一区三区三区| 在线观看日韩国产| 久久精品一区八戒影视| 亚洲图片有声小说| 国产91在线观看| 欧美高清视频在线高清观看mv色露露十八| 久久一区二区三区四区| 亚洲精品中文在线影院| 国内国产精品久久| 欧美日韩精品久久久| 国产精品亲子伦对白| 免费精品视频在线| 色偷偷一区二区三区| 国产色产综合产在线视频| 日韩av一区二| 欧美日韩国产精品自在自线| 国产精品视频在线看| 狠狠色2019综合网| 欧美精品色综合| 亚洲高清不卡在线| 一本色道**综合亚洲精品蜜桃冫| 久久先锋影音av鲁色资源网| 日本伊人午夜精品| 欧美三级韩国三级日本一级| 国产精品欧美一级免费| 久久99精品国产麻豆婷婷| 欧美日韩精品欧美日韩精品一| 国产精品家庭影院| 成人午夜在线播放| 久久久不卡影院| 韩国午夜理伦三级不卡影院| 日韩免费视频一区二区| 日韩精品午夜视频| 777欧美精品| 婷婷开心激情综合| 欧美群妇大交群中文字幕| 亚洲一区国产视频| 欧美在线一二三四区| 一区二区三区不卡视频| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美精品一区二区三区四区| 精品一区二区影视| 久久综合色综合88| 国产九色sp调教91| 国产精品日产欧美久久久久| 福利91精品一区二区三区| 国产色产综合色产在线视频|