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

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

?? why-shell.html

?? Shall高級編程
?? HTML
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><HTML><HEAD><TITLE>Why Shell Programming?</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="Advanced Bash-Scripting Guide"HREF="index.html"><LINKREL="UP"TITLE="Introduction"HREF="part1.html"><LINKREL="PREVIOUS"TITLE="Introduction"HREF="part1.html"><LINKREL="NEXT"TITLE="Starting Off With a Sha-Bang"HREF="sha-bang.html"><METAHTTP-EQUIV="Content-Style-Type"CONTENT="text/css"><LINKREL="stylesheet"HREF="common/kde-common.css"TYPE="text/css"><METAHTTP-EQUIV="Content-Type"CONTENT="text/html; charset=iso-8859-1"><METAHTTP-EQUIV="Content-Language"CONTENT="en"><LINKREL="stylesheet"HREF="common/kde-localised.css"TYPE="text/css"TITLE="KDE-English"><LINKREL="stylesheet"HREF="common/kde-default.css"TYPE="text/css"TITLE="KDE-Default"></HEAD><BODYCLASS="CHAPTER"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#AA0000"VLINK="#AA0055"ALINK="#AA0000"STYLE="font-family: sans-serif;"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Advanced Bash-Scripting Guide: An in-depth exploration of the art of shell scripting</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="part1.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="sha-bang.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="CHAPTER"><H1><ANAME="WHY-SHELL"></A>Chapter 1. Why Shell Programming?</H1><TABLEBORDER="0"WIDTH="100%"CELLSPACING="0"CELLPADDING="0"CLASS="EPIGRAPH"><TR><TDWIDTH="45%">&nbsp;</TD><TDWIDTH="45%"ALIGN="LEFT"VALIGN="TOP"><I><P><I>No programming language is perfect. There is not even a single        best language; there are only languages well suited or perhaps poorly	suited for particular purposes.</I></P><P><I>--Herbert Mayer</I></P></I></TD></TR></TABLE><P>A working knowledge of shell scripting is essential to anyone      wishing to become reasonably proficient at system administration,      even if they do not anticipate ever having to actually write a      script. Consider that as a Linux machine boots up, it executes the      shell scripts in <TTCLASS="FILENAME">/etc/rc.d</TT>      to restore the system configuration and set up services. A detailed      understanding of these startup scripts is important for analyzing      the behavior of a system, and possibly modifying it.</P><P>The craft of scripting is not hard to master,      since the scripts can be built in bite-sized sections and there      is only a fairly small set of shell-specific operators and options      <ANAME="AEN63"HREF="#FTN.AEN63">[1]</A>      to learn. The syntax is simple and straightforward, similar to      that of invoking and chaining together utilities at the command      line, and there are only a few <SPANCLASS="QUOTE">"rules"</SPAN> governing      their use. Most short scripts work right the first time, and      debugging even the longer ones is straightforward.</P><P>A shell script is a <SPANCLASS="QUOTE">"quick-and-dirty"</SPAN> method of      prototyping a complex application.  Getting even a limited subset      of the functionality to work in a script is often a useful      first stage in project development. This way, the structure of      the application can be tested and played with,      and the major pitfalls found before proceeding      to the final coding in <ICLASS="FIRSTTERM">C</I>,      <ICLASS="FIRSTTERM">C++</I>, <ICLASS="FIRSTTERM">Java</I>, or <AHREF="wrapper.html#PERLREF">Perl</A>.</P><P>Shell scripting hearkens back to the classic UNIX philosophy      of breaking complex projects into simpler subtasks, of chaining      together components and utilities. Many consider this a better,      or at least more esthetically pleasing approach to problem solving      than using one of the new generation of high powered all-in-one      languages, such as <ICLASS="FIRSTTERM">Perl</I>, which attempt to      be all things to all people, but at the cost of forcing you to      alter your thinking processes to fit the tool.</P><P>According to <AHREF="biblio.html#MAYERREF">Herbert Mayer</A>,      <SPANCLASS="QUOTE">"a useful language needs arrays, pointers,	and a generic mechanism for building data structures."</SPAN>	By these criteria, shell scripting falls somewhat short of being	<SPANCLASS="QUOTE">"useful."</SPAN> Or, perhaps not. . . .</P><TABLECLASS="SIDEBAR"BORDER="1"CELLPADDING="5"><TR><TD><DIVCLASS="SIDEBAR"><ANAME="AEN79"></A><P>When not to use shell scripts      <UL><LI><P>Resource-intensive tasks, especially where speed is	    a factor (sorting, hashing, recursion            <ANAME="AEN84"HREF="#FTN.AEN84">[2]</A>	    	    ...)</P></LI><LI><P>Procedures involving heavy-duty math operations,	    especially floating point arithmetic, arbitrary	    precision calculations, or complex numbers (use	    <ICLASS="FIRSTTERM">C++</I> or <ICLASS="FIRSTTERM">FORTRAN</I>	    instead)</P></LI><LI><P>Cross-platform portability required (use	    <ICLASS="FIRSTTERM">C</I> or <ICLASS="FIRSTTERM">Java</I>	    instead)</P></LI><LI><P>Complex applications, where structured programming is	    a necessity (type-checking of variables, function	    prototypes, etc.)</P></LI><LI><P>Mission-critical applications upon which you are betting the	     future of the company</P></LI><LI><P>Situations where <SPANCLASS="emphasis"><ICLASS="EMPHASIS">security</I></SPAN> is	    important, where you need to guarantee the integrity of	    your system and protect against intrusion, cracking, and	    vandalism</P></LI><LI><P>Project consists of subcomponents with interlocking	    dependencies</P></LI><LI><P>Extensive file operations required	    (<ICLASS="FIRSTTERM">Bash</I> is limited to serial file access,	    and that only in a particularly clumsy and inefficient	    line-by-line fashion.)</P></LI><LI><P>Need native support for multi-dimensional arrays</P></LI><LI><P>Need data structures, such as linked lists or trees</P></LI><LI><P>Need to generate / manipulate graphics or GUIs</P></LI><LI><P>Need direct access to system hardware</P></LI><LI><P>Need port or <AHREF="devproc.html#SOCKETREF">socket</A> I/O</P></LI><LI><P>Need to use libraries or interface with legacy code</P></LI><LI><P>Proprietary, closed-source applications (Shell scripts	    put the source code right out in the open for all the world	    to see.)</P></LI></UL></P><P>If any of the above applies, consider a more powerful scripting      language -- perhaps <ICLASS="FIRSTTERM">Perl</I>,      <ICLASS="FIRSTTERM">Tcl</I>, <ICLASS="FIRSTTERM">Python</I>,      <ICLASS="FIRSTTERM">Ruby</I> -- or possibly a      compiled language such as <ICLASS="FIRSTTERM">C</I>,      <ICLASS="FIRSTTERM">C++</I>, or <ICLASS="FIRSTTERM">Java</I>. Even      then, prototyping the application as a shell script might still      be a useful development step.</P></DIV></TD></TR></TABLE><P><ANAME="BASHDEF"></A></P><P>We will be using <SPANCLASS="ACRONYM">Bash</SPAN>, an acronym for      <SPANCLASS="QUOTE">"Bourne-Again shell"</SPAN> and a pun on Stephen Bourne's      now classic <ICLASS="FIRSTTERM">Bourne</I> shell. Bash has become      a <ICLASS="FOREIGNPHRASE">de facto</I> standard for shell      scripting on all flavors of UNIX. Most of the principles this      book covers apply equally well to scripting with other shells,      such as the <ICLASS="FIRSTTERM">Korn Shell</I>, from which Bash      derives some of its features,       <ANAME="AEN140"HREF="#FTN.AEN140">[3]</A>      and the <ICLASS="FIRSTTERM">C Shell</I> and its variants. (Note that      <ICLASS="FIRSTTERM">C Shell</I> programming is not recommended due to      certain inherent problems, as pointed out in an October, 1993 <AHREF="http://www.etext.org/Quartz/computer/unix/csh.harmful.gz"TARGET="_top">Usenet      post</A> by Tom Christiansen.)  </P><P>What follows is a tutorial on shell scripting. It relies      heavily on examples to illustrate various features of the shell.      The example scripts work -- they've been tested, insofar as was      possible -- and some of them are even useful in real life. The      reader can play with the actual working code of the examples      in the source archive (<TTCLASS="FILENAME">scriptname.sh</TT> or      <TTCLASS="FILENAME">scriptname.bash</TT>),         <ANAME="AEN150"HREF="#FTN.AEN150">[4]</A>      give them <ICLASS="FIRSTTERM">execute</I> permission      (<TTCLASS="USERINPUT"><B>chmod u+rx scriptname</B></TT>),      then run them to see what happens. Should the source      archive not be available, then cut-and-paste from the <AHREF="http://www.tldp.org/LDP/abs/abs-guide.html.tar.gz"TARGET="_top">HTML</A> or      <AHREF="http://www.tldp.org/LDP/abs/abs-guide.pdf"TARGET="_top">pdf</A>      rendered versions. Be aware that some of the scripts presented here      introduce features before they are explained, and this may require      the reader to temporarily skip ahead for enlightenment.</P><P>Unless otherwise noted, <AHREF="mailto:thegrendel@theriver.com"TARGET="_top">the author</A> of this       book wrote the example scripts that follow.</P></DIV><H3CLASS="FOOTNOTES">Notes</H3><TABLEBORDER="0"CLASS="FOOTNOTES"WIDTH="100%"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="5%"><ANAME="FTN.AEN63"HREF="why-shell.html#AEN63">[1]</A></TD><TDALIGN="LEFT"VALIGN="TOP"WIDTH="95%"><P>These are referred to as <AHREF="internal.html#BUILTINREF">builtins</A>, features internal to the        shell.</P></TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="5%"><ANAME="FTN.AEN84"HREF="why-shell.html#AEN84">[2]</A></TD><TDALIGN="LEFT"VALIGN="TOP"WIDTH="95%"><P>Although <AHREF="localvar.html#RECURSIONREF0">recursion	      <SPANCLASS="emphasis"><ICLASS="EMPHASIS">is</I></SPAN> possible in a shell script</A>,	      it tends to be slow and its implementation is often	      an <AHREF="recurnolocvar.html#FIBOREF">ugly kludge</A>.</P></TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="5%"><ANAME="FTN.AEN140"HREF="why-shell.html#AEN140">[3]</A></TD><TDALIGN="LEFT"VALIGN="TOP"WIDTH="95%"><P>Many of the features of <ICLASS="FIRSTTERM">ksh88</I>,	 and even a few from the updated <ICLASS="FIRSTTERM">ksh93</I>	 have been merged into Bash.</P></TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="5%"><ANAME="FTN.AEN150"HREF="why-shell.html#AEN150">[4]</A></TD><TDALIGN="LEFT"VALIGN="TOP"WIDTH="95%"><P>By convention, user-written shell scripts that are	 Bourne shell compliant generally take a name with a	 <TTCLASS="FILENAME">.sh</TT> extension.  System scripts, such as	 those found in <TTCLASS="FILENAME">/etc/rc.d</TT>,	 do not conform to this nomenclature.</P></TD></TR></TABLE><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="part1.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="index.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="sha-bang.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Introduction</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="part1.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Starting Off With a Sha-Bang</TD></TR></TABLE></DIV></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产精品网麻豆系列| 一本一道综合狠狠老| 国产成人av资源| 欧美午夜一区二区三区| 国产欧美一区在线| 另类小说欧美激情| 欧美乱熟臀69xxxxxx| 伊人一区二区三区| 成人性视频免费网站| 精品日韩一区二区三区免费视频| 亚洲精品美腿丝袜| 欧美日本国产视频| 亚洲另类在线制服丝袜| 欧美日韩国产精选| 国产精品影音先锋| 精品日韩一区二区三区免费视频| 国产福利精品一区二区| 中文字幕一区在线| 成人在线一区二区三区| 亚洲精品国产一区二区三区四区在线| 欧美丝袜自拍制服另类| 国产一区久久久| 久久久久久免费| 国内精品久久久久影院色| 日韩免费观看高清完整版| 午夜精品福利一区二区蜜股av | 日韩av电影天堂| 欧美亚洲动漫精品| 美腿丝袜亚洲三区| 日韩欧美一卡二卡| 91丨porny丨在线| 亚洲人成伊人成综合网小说| 99re热这里只有精品视频| 亚洲色图第一区| 91久久线看在观草草青青| 一区二区三区精品| 欧美日韩国产系列| 成人网页在线观看| 免费观看一级欧美片| 日韩久久久久久| 色美美综合视频| 国产精品18久久久| 老司机免费视频一区二区| 国产精品成人网| 91在线云播放| 麻豆成人久久精品二区三区红| 国产精品成人在线观看| 欧美xxxx老人做受| 日本道色综合久久| 成人午夜伦理影院| 国产精品一区二区黑丝| 日韩在线卡一卡二| 日韩女优制服丝袜电影| 色一区在线观看| 成人免费毛片片v| 国产乱子伦一区二区三区国色天香 | 一区二区成人在线| 国产精品理论片| 久久久久久久久一| 日韩精品在线一区二区| 欧美日韩在线播放| 日韩影院精彩在线| 一区二区理论电影在线观看| 最新中文字幕一区二区三区| 国产免费观看久久| 精品国产sm最大网站免费看| 91精品欧美一区二区三区综合在 | 欧美高清www午色夜在线视频| 91伊人久久大香线蕉| 岛国av在线一区| 国产精品66部| 国产精品乡下勾搭老头1| 国产在线精品免费| 国产成人av一区二区| 国产乱色国产精品免费视频| 国产一区不卡视频| 国产成a人亚洲精品| 夜夜夜精品看看| 一区二区在线观看视频在线观看| 国产精品三级在线观看| 91精品国产高清一区二区三区| 国产电影一区在线| 国产成人免费在线观看不卡| 成人在线视频首页| 91丨九色丨蝌蚪丨老版| 色哟哟国产精品免费观看| 色噜噜夜夜夜综合网| 欧美日韩国产一级片| 日韩免费视频线观看| 久久久777精品电影网影网| 91精品午夜视频| 精品国产乱码久久久久久久久 | 久久精品一区八戒影视| 国产目拍亚洲精品99久久精品| 国产精品蜜臀在线观看| 亚洲综合视频在线观看| 亚洲天堂精品在线观看| 亚洲精品中文字幕在线观看| 亚洲成a人片在线不卡一二三区 | 精品处破学生在线二十三| 久久久电影一区二区三区| 中文字幕一区av| 亚洲一区二区高清| 激情国产一区二区 | 亚洲成人一区在线| 麻豆高清免费国产一区| 国产不卡视频在线播放| 91久久香蕉国产日韩欧美9色| 91麻豆精品国产| 国产亚洲一区二区在线观看| 亚洲精品乱码久久久久| 麻豆精品一区二区综合av| 成人综合婷婷国产精品久久免费| 在线免费精品视频| 欧美专区日韩专区| 欧美成人一区二区三区在线观看 | 一区二区三区四区不卡在线 | a级精品国产片在线观看| 狠狠v欧美v日韩v亚洲ⅴ| 99久久婷婷国产精品综合| 欧美色图在线观看| 国产校园另类小说区| 亚洲一区二区三区四区五区黄| 久久精品国产第一区二区三区| 99久久国产综合精品女不卡| 日韩你懂的在线播放| 亚洲影院在线观看| 国产a精品视频| 91精品欧美福利在线观看| 亚洲男女毛片无遮挡| 黑人精品欧美一区二区蜜桃 | 日韩视频不卡中文| 日韩一卡二卡三卡四卡| 中文字幕日韩欧美一区二区三区| 奇米精品一区二区三区在线观看一| 99久久婷婷国产综合精品电影 | 色国产综合视频| 国产午夜精品久久久久久久| 日本亚洲天堂网| 91久久线看在观草草青青| 国产精品系列在线| 激情综合色播激情啊| 欧美理论在线播放| 一区二区日韩av| av中文字幕亚洲| 国产午夜久久久久| 久久99国产精品免费网站| 丰满岳乱妇一区二区三区| 欧美tickle裸体挠脚心vk| 视频一区二区中文字幕| 欧美在线free| 亚洲男同性视频| 91污在线观看| 国产精品福利一区| 成人精品免费视频| 91丝袜美女网| 亚洲视频小说图片| 91亚洲国产成人精品一区二三| 国产精品美女www爽爽爽| 国产精品一区二区免费不卡| www国产精品av| 亚洲免费观看高清完整版在线观看 | 亚洲国产成人在线| 亚洲午夜精品久久久久久久久| 久久精品72免费观看| 欧美一区二区精品久久911| 性久久久久久久久久久久| 欧美揉bbbbb揉bbbbb| 天堂久久久久va久久久久| 欧美精品三级在线观看| 日本成人在线网站| 精品久久久久久最新网址| 国产真实乱偷精品视频免| 久久伊人中文字幕| 成人午夜碰碰视频| 亚洲免费在线观看视频| 欧美日韩亚洲国产综合| 男女男精品视频网| 精品av久久707| 高清在线成人网| 136国产福利精品导航| 色综合中文综合网| 亚洲国产精品久久久久婷婷884 | 91.com视频| 久久不见久久见中文字幕免费| 精品国产三级电影在线观看| 国产一区二区三区在线看麻豆| 欧美韩国日本一区| 色偷偷成人一区二区三区91| 午夜精品123| 久久久久久一级片| 色狠狠综合天天综合综合| 日本不卡高清视频| 国产精品嫩草影院com| 在线观看亚洲专区| 久久丁香综合五月国产三级网站| 国产精品欧美经典| 欧美精品日韩精品| 国产91丝袜在线播放0| 一区二区三区欧美视频|