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

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

?? _chapter 1.htm

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


<h2 class="docChapterTitle">Chapter 1. Introduction to UNIX Shells</h2><ul><li>&nbsp;<a class="docLink" href="#ch01lev1sec1">1.1 Definition and Function</a></li>
<li>&nbsp;<a class="docLink" href="#ch01lev1sec2">1.2 System Startup and the Login Shell</a></li>
<li>&nbsp;<a class="docLink" href="#ch01lev1sec3">1.3 Processes and the Shell</a></li>
<li>&nbsp;<a class="docLink" href="#ch01lev1sec4">1.4 The Environment and Inheritance</a></li>
<li>&nbsp;<a class="docLink" href="#ch01lev1sec5">1.5 Executing Commands from Scripts</a></li>
</ul>
<p class="docText">
<img alt="graphics/ch01.gif" src="ch01.gif" border="0" width="500" height="353"></p>
<h3 class="docSection1Title" id="ch01lev1sec1">1.1 Definition and Function</h3>
<p class="docText">The shell is a special program used as an interface between 
the user and the heart of the UNIX operating system, a program called the
<span class="docEmphasis">kernel,</span> as shown in
<a class="docLink" href="#ch01fig01">Figure 1.1</a>. The kernel is loaded into 
memory at boot-up time and manages the system until shutdown. It creates and 
controls processes, and manages memory, file systems, communications, and so 
forth. All other programs, including shell programs, reside out on the disk. The 
kernel loads those programs into memory, executes them, and cleans up the system 
when they terminate. The shell is a utility program that starts up when you log 
on. It allows users to interact with the kernel by interpreting commands that 
are typed either at the command line or in a script file.</p>
<center>
<h5 id="ch01fig01" class="docFigureTitle">Figure 1.1. The kernel, the shell, and you.</h5>
<p class="docText">
<img alt="graphics/01fig01.gif" src="01fig01.gif" border="0" width="500" height="299"></p>
</center>
<p class="docText">When you log on, an interactive shell starts up and prompts 
you for input. After you type a command, it is the responsibility of the shell 
to (a) parse the command line; (b) handle wildcards, redirection, pipes, and job 
control; and (c) search for the command, and if found, execute that command. 
When you first learn UNIX, you spend most of your time executing commands from 
the prompt. You use the shell interactively.</p>
<p class="docText">If you type the same set of commands on a regular basis, you 
may want to automate those tasks. This can be done by putting the commands in a 
file, called a <span class="docEmphasis">script file,</span> and then executing 
the file. A shell script is much like a batch file: It is a list of UNIX 
commands typed into a file, and then the file is executed. More sophisticated 
scripts contain programming constructs for making decisions, looping, file 
testing, and so forth. Writing scripts not only requires learning programming 
constructs and techniques, but assumes that you have a good understanding of 
UNIX utilities and how they work. There are some utilities, such as
<span class="docEmphasis">grep, sed,</span> and <span class="docEmphasis">awk,</span> 
that are extremely powerful tools used in scripts for the manipulation of 
command output and files. After you have become familiar with these tools and 
the programming constructs for your particular shell, you will be ready to start 
writing useful scripts. When executing commands from within a script, you are 
using the shell as a programming language.</p>
<h4 class="docSection2Title" id="ch01lev2sec1">1.1.1 The Three Major UNIX Shells</h4>
<p class="docText">The three prominent and supported shells on most UNIX systems 
are the <span class="docEmphasis">Bourne</span> shell (AT&amp;T shell), the
<span class="docEmphasis">C</span> shell (Berkeley shell), and the
<span class="docEmphasis">Korn</span> shell (superset of the Bourne shell). All 
three of these behave pretty much the same way when running interactively, but 
have some differences in syntax and efficiency when used as scripting languages.</p>
<p class="docText">The Bourne shell is the standard UNIX shell, and is used to 
administer the system. Most of the system administration scripts, such as the
<span class="docEmphasis">rc</span> <span class="docEmphasis">start</span> and
<span class="docEmphasis">stop</span> scripts and <span class="docEmphasis">
shutdown</span> are Bourne shell scripts, and when in single user mode, this is 
the shell commonly used by the administrator when running as root. This shell 
was written at AT&amp;T and is known for being concise, compact, and fast. The 
default Bourne shell prompt is the dollar sign (<span class="docEmphasis">$</span>).</p>
<p class="docText">The C shell was developed at Berkeley and added a number of 
features, such as command line history, aliasing, built-in arithmetic, filename 
completion, and job control. The C shell has been favored over the Bourne shell 
by users running the shell interactively, but administrators prefer the Bourne 
shell for scripting, because Bourne shell scripts are simpler and faster than 
the same scripts written in C shell. The default C shell prompt is the percent 
sign (<span class="docEmphasis">%</span>).</p>
<p class="docText">The Korn shell is a superset of the Bourne shell written by 
David Korn at AT&amp;T. A number of features were added to this shell above and 
beyond the enhancements of the C shell. Korn shell features include an editable 
history, aliases, functions, regular expression wildcards, built-in arithmetic, 
job control, coprocessing, and special debugging features. The Bourne shell is 
almost completely upward-compatible with the Korn shell, so older Bourne shell 
programs will run fine in this shell. The default Korn shell prompt is the 
dollar sign (<span class="docEmphasis">$</span>).</p>
<h4 class="docSection2Title" id="ch01lev2sec2">1.1.2 The Linux Shells</h4>
<p class="docText">Although often called &quot;Linux&quot; shells, Bash and TC shells are 
freely available and can be compiled on any UNIX system; in fact, the shells are 
now bundled with Solaris 8 and Sun's UNIX operating system. But when you install 
Linux, you will have access to the GNU shells and tools, and not the standard 
UNIX shells and tools. Although Linux supports a number of shells, the Bourne 
Again shell (<span class="docEmphasis">bash)</span> and the TC shell (<span class="docEmphasis">tcsh)</span> 
are by far the most popular. The Z shell is another Linux shell that 
incorporates a number of features from the Bourne Again shell, the TC shell, and 
the Korn shell. The Public Domain Korn shell (<span class="docEmphasis">pdksh</span>) 
a Korn shell clone, is also available, and for a fee you can get AT&amp;T's Korn 
shell, not to mention a host of other unknown smaller shells.</p>
<p class="docText">To see what shells are available under your version of Linux, 
look in the file, <span class="docEmphasis">/etc/shell.</span></p>
<p class="docText">To change to one of the shells listed in
<span class="docEmphasis">/etc/shell,</span> type the <span class="docEmphasis">
chsh</span> command and the name of the shell. For example, to change 
permanently to the TC shell, use the <span class="docEmphasis">chsh</span> 
command. At the prompt, type:</p>
<pre>chsh /bin/tcsh</pre>
<h4 class="docSection2Title" id="ch01lev2sec3">1.1.3 History of the Shell</h4>
<p class="docText">The first significant, standard UNIX shell was introduced in 
V7 (seventh edition of AT&amp;T) UNIX in late 1979, and was named after its creator, 
Stephen Bourne. The Bourne shell as a programming language is based on a 
language called Algol, and was primarily used to automate system administration 
tasks. Although popular for its simplicity and speed, it lacks many of the 
features for interactive use, such as history, aliasing, and job control. Enter
<span class="docEmphasis">bash,</span> the Bourne Again shell, which was 
developed by Brian Fox of the Free Software Foundation under the GNU copyright 
license and is the default shell for the very popular Linux operating system. It 
was intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools 
standard. <span class="docEmphasis">Bash</span> also offers a number of new 
features (both at the interactive and programming level) missing in the original 
Bourne shell (yet Bourne shell scripts will still run unmodified). It also 
incorporates the most useful features of both the C shell and Korn shell. It's 
big. The improvements over Bourne shell are: command line history and editing, 
directory stacks, job control, functions, aliases, arrays, integer arithmetic 
(in any base from 2 to 64), and Korn shell features, such as extended 
metacharacters, select loops for creating menus, the <span class="docEmphasis">
let</span> command, etc.</p>
<p class="docText">The C shell, developed at the University of California at 
Berkeley in the late 1970s, was released as part of 2BSD UNIX. The shell, 
written primarily by Bill Joy, offered a number of additional features not 
provided in the standard Bourne shell. The C shell is based on the C programming 
language, and when used as a programming language, it shares a similar syntax. 
It also offers enhancements for interactive use, such as command line history, 
aliases, and job control. Because the shell was designed on a large machine and 
a number of additional features were added, the C shell has a tendency to be 
slow on small machines and sluggish even on large machines when compared to the 
Bourne shell.</p>
<p class="docText">The TC shell is an expanded version of the C shell. Some of 
the new features are: command line editing (<span class="docEmphasis">emacs</span> 
and <span class="docEmphasis">vi</span>), scrolling the history list, advanced 
filename, variable, and command completion, spelling correction, scheduling 
jobs, automatic locking and logout, time stamps in the history list, etc. It's 
also big.</p>
<p class="docText">With both the Bourne shell and the C shell available, the 
UNIX user now had a choice, and conflicts arose over which was the better shell. 
David Korn, from AT&amp;T, invented the Korn shell in the mid-1980s. It was released 
in 1986 and officially became part of the SVR4 distribution of UNIX in 1988. The 
Korn shell, really a superset of the Bourne shell, runs not only on UNIX 
systems, but also on OS/2, VMS, and DOS. It provides upward-compatibility with 
the Bourne shell, adds many of the popular features of the C shell, and is fast 
and efficient. The Korn shell has gone through a number of revisions. The most 
widely used version of the Korn shell is the 1988 version, although the 1993 
version is gaining popularity. Linux users may find they are running the free 
version of the Korn shell, called The Public Domain Korn shell, or simply
<span class="docEmphasis">pdksh,</span> a clone of David Korn's 1988 shell. It 
is free and portable and currently work is underway to make it fully compatible 
with its namesake, Korn shell, and to make it POSIX compliant. Also available is 
the Z shell (<span class="docEmphasis">zsh</span>), another Korn shell clone 
with TC shell features, written by Paul Falsted, and freely available at a 
number of Web sites.</p>
<h4 class="docSection2Title" id="ch01lev2sec4">1.1.4 Uses of the Shell</h4>
<p class="docText">One of the major functions of a shell is to interpret 
commands entered at the command line prompt when running interactively. The 
shell parses the command line, breaking it into words (called
<span class="docEmphasis">tokens</span>), separated by whitespace, which 
consists of tabs, spaces, or a newline. If the words contain special 
metacharacters, the shell evaluates them. The shell handles file I/O and 
background processing. After the command line has been processed, the shell 
searches for the command and starts its execution.</p>
<p class="docText">Another important function of the shell is to customize the 
user's environment, normally done in shell initialization files. These files 
contain definitions for setting terminal keys and window characteristics; 
setting variables that define the search path, permissions, prompts, and the 
terminal type; and setting variables that are required for specific applications 
such as windows, text-processing programs, and libraries for programming 
languages. The Korn shell and C shell also provide further customization with 
the addition of history and aliases, built-in variables set to protect the user 
from clobbering files or inadvertently logging out, and to notify the user when 
a job has completed.</p>
<p class="docText">The shell can also be used as an interpreted programming 
language. Shell programs, also called scripts, consist of commands listed in a 
file. The programs are created in an editor (although on-line scripting is 
permitted). They consist of UNIX commands interspersed with fundamental 
programming constructs such as variable assignment, conditional tests, and 
loops. You do not have to compile shell scripts. The shell interprets each line 
of the script as if it had been entered from the keyboard. Because the shell is 
responsible for interpreting commands, it is necessary for the user to have an 
understanding of what those commands are. See
<a class="docLink" href="Appendix A.htm">Appendix A</a> for a 
list of useful commands.</p>
<h4 class="docSection2Title" id="ch01lev2sec5">1.1.5 Responsibilities of the Shell</h4>
<p class="docText">The shell is ultimately responsible for making sure that any 
commands typed at the prompt get properly executed. Included in those 
responsibilities are:</p>
<span style="FONT-WEIGHT: bold">
<ol class="docList" type="1">
  <li><span style="FONT-WEIGHT: normal">
  <p class="docList">Reading input and parsing the command line.</span></li>
  <li><span style="FONT-WEIGHT: normal">
  <p class="docList">Evaluating special characters.</span></li>
  <li><span style="FONT-WEIGHT: normal">
  <p class="docList">Setting up pipes, redirection, and background processing.</span></li>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品视频一区| 日日摸夜夜添夜夜添精品视频| 欧美一区二区三区四区五区| 色婷婷av一区二区三区大白胸| 成人小视频免费观看| 国产成人一区在线| 久久成人麻豆午夜电影| 久久精品国产99国产精品| 天天操天天干天天综合网| 三级影片在线观看欧美日韩一区二区| 亚洲国产精品久久不卡毛片| 亚洲国产日韩a在线播放| 婷婷开心激情综合| 国产揄拍国内精品对白| 成人午夜在线播放| 欧美性猛片aaaaaaa做受| 欧美美女bb生活片| 精品三级在线看| 久久精品欧美日韩精品| 国产精品久久久久久久久动漫| 亚洲色图制服丝袜| 亚洲成人激情自拍| 精品一区二区免费视频| 成人av中文字幕| 欧美日韩中文精品| 久久久久久久久久久久久夜| 国产精品不卡在线| 亚洲成人av资源| 国产福利一区二区| 欧美酷刑日本凌虐凌虐| 久久九九久精品国产免费直播| 亚洲欧美色综合| 日韩成人午夜精品| 97国产一区二区| 日韩免费视频一区二区| 日韩码欧中文字| 男女性色大片免费观看一区二区| 国产宾馆实践打屁股91| 欧美视频三区在线播放| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲一级电影视频| 国产成人av福利| 欧美精品一卡两卡| 国产精品久久久久久福利一牛影视| 亚洲国产另类av| 成人精品视频一区二区三区 | 欧美美女一区二区三区| 久久综合色天天久久综合图片| 亚洲四区在线观看| 国产精品亚洲午夜一区二区三区 | 欧美高清视频一二三区 | 在线观看免费亚洲| 国产欧美精品区一区二区三区| 亚洲午夜精品17c| 99久久综合99久久综合网站| 日韩欧美www| 亚洲第一二三四区| 日本久久电影网| 日韩一区在线看| 丁香亚洲综合激情啪啪综合| 欧美电视剧免费观看| 婷婷夜色潮精品综合在线| 在线观看不卡一区| **性色生活片久久毛片| 国产精品2024| 久久亚洲综合色| 国产伦精品一区二区三区免费迷| 欧美成人欧美edvon| 麻豆免费精品视频| 欧美一区二区在线观看| 午夜激情久久久| 在线不卡免费欧美| 美腿丝袜一区二区三区| 制服丝袜国产精品| 视频在线观看91| 日韩欧美在线观看一区二区三区| 天堂一区二区在线免费观看| 欧美日韩国产精品成人| 视频一区中文字幕| 日韩午夜在线影院| 国产精品一区免费在线观看| 久久综合网色—综合色88| 国产成人在线电影| 国产精品美女久久福利网站| 成人免费视频国产在线观看| 亚洲欧洲美洲综合色网| 色婷婷狠狠综合| 天天影视涩香欲综合网| 日韩免费观看高清完整版在线观看| 久久黄色级2电影| 26uuu国产电影一区二区| 国产一区二区精品久久| 国产精品久久久久影院老司 | 开心九九激情九九欧美日韩精美视频电影| 欧美乱熟臀69xxxxxx| 热久久久久久久| 久久一区二区三区四区| 9久草视频在线视频精品| 亚洲一区二区在线免费看| 777xxx欧美| 国产传媒欧美日韩成人| 一区二区三区视频在线观看| 在线不卡的av| 福利一区二区在线观看| 亚洲第一福利一区| 久久久午夜精品| 欧美伊人精品成人久久综合97 | 精品蜜桃在线看| 菠萝蜜视频在线观看一区| 性感美女极品91精品| 久久综合国产精品| 91国产丝袜在线播放| 蜜臀91精品一区二区三区| 国产精品不卡一区二区三区| 在线综合亚洲欧美在线视频| 成人国产在线观看| 日产欧产美韩系列久久99| 国产精品美女久久久久久久久久久 | 日韩欧美成人一区二区| 99re亚洲国产精品| 国产一区二区电影| 天天影视涩香欲综合网| 亚洲视频图片小说| 久久久99免费| 日韩欧美久久久| 色婷婷国产精品| 大胆欧美人体老妇| 麻豆高清免费国产一区| 一区二区理论电影在线观看| 久久久久久一级片| 日韩欧美一级特黄在线播放| 在线看国产日韩| 成人精品在线视频观看| 韩国一区二区视频| 蜜桃视频在线观看一区二区| 亚洲成va人在线观看| 日韩伦理免费电影| 欧美激情一区二区三区全黄| 欧美一级二级在线观看| 在线成人免费观看| 欧美日韩亚洲另类| 91黄视频在线观看| 99精品黄色片免费大全| 成人深夜视频在线观看| 精品一区二区三区视频在线观看| 视频在线观看国产精品| 丝袜亚洲精品中文字幕一区| 一区二区三区在线观看欧美| 中文字幕综合网| 中文字幕人成不卡一区| 国产精品久久三| 日韩美女视频一区二区| 亚洲男人都懂的| 亚洲精品精品亚洲| 亚洲一区二区中文在线| 亚洲国产成人av网| 爽爽淫人综合网网站| 日本免费在线视频不卡一不卡二| 亚洲丶国产丶欧美一区二区三区| 一区二区三区在线高清| 午夜视频一区二区| 日韩高清不卡一区| 九色porny丨国产精品| 国产综合久久久久久鬼色| 国产精品系列在线观看| 成人aa视频在线观看| 色哟哟在线观看一区二区三区| 日本丰满少妇一区二区三区| 精品视频全国免费看| 日韩欧美一级片| 国产精品情趣视频| 亚洲老司机在线| 日韩精品一区第一页| 国产麻豆精品视频| 91丨porny丨国产| 欧美日韩国产综合草草| 日韩三级免费观看| 国产精品午夜电影| 亚洲综合久久av| 国内成人精品2018免费看| 成人污视频在线观看| 欧美中文字幕久久| 精品成人私密视频| 一区二区三区四区精品在线视频| 日韩国产精品久久| 成人激情动漫在线观看| 欧美日高清视频| 中文欧美字幕免费| 偷拍与自拍一区| 国产成人亚洲精品青草天美| 91国产成人在线| 久久香蕉国产线看观看99| 亚洲欧美日韩国产一区二区三区| 首页亚洲欧美制服丝腿| 成人动漫在线一区| 91精品在线麻豆| 综合色中文字幕| 久久电影网电视剧免费观看| 91丨九色丨蝌蚪丨老版| 久久久亚洲国产美女国产盗摄 |