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

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

?? unx13.htm

?? Unix Unleashed, Third Edition is written with the power user and system administrator in mind. This
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
% ps -e</PRE>

<P>except that in the second case the results of each command would appear between the command input lines.

<BR></P>

<P>When the semicolon is used to separate commands on a line, the commands are executed in sequence. The shell waits until one command is complete before executing the next. You can also execute commands simultaneously (see the section titled 
&quot;Executing Commands in the Background&quot;) or execute them conditionally, which means that the shell executes the next command only if the first command succeeds or fails (see the section titled &quot;Executing Commands Conditionally&quot;).

<BR></P>

<H5 ALIGN="CENTER">

<CENTER><A ID="I12" NAME="I12">

<FONT SIZE=3><B>Entering Commands Too Long for One Line</B>

<BR></FONT></A></CENTER></H5>

<P>Sometimes command lines get quite lengthy. On some terminals, when you reach the edge of the display screen the input autowraps to the next line, but depending on terminal settings, some do not. It would be nice if you could type part of a command on 
one line and enter the remainder of the command on a second line. This can be accomplished by escaping the newline character.

<BR></P>

<P>Remember that the shell sees a line of input as a statement terminated with a newline character. But the newline character is also considered to be a white space character. If you end a line with a backslash (\), the next character&#151;the newline 
character&#151;will be treated literally, meaning that the shell will not interpret the newline character as the end of the line of input.

<BR></P>

<PRE>% echo Now is the time for all good men     \_

to come to the aid of the party.

Now is the time for all good men to come to the aid of the party.</PRE>

<H5 ALIGN="CENTER">

<CENTER><A ID="I13" NAME="I13">

<FONT SIZE=3><B>Executing Commands in the Background</B>

<BR></FONT></A></CENTER></H5>

<P>Normally when you execute commands, they are executed in the foreground. This means that the command has the system's undivided attention, and you can't do anything else until the command finishes executing. For commands that take a long time to 
execute, however, this can be a problem. To free your system without waiting for the command to finish, you can execute the command in the background by putting an ampersand (&amp;) at the end of the command:

<BR></P>

<PRE>% who -H &amp;

[1] +  Running    who -H &amp;

%</PRE>

<P>You also can run multiple commands in the background simultaneously:

<BR></P>

<PRE>% who -H &amp; df -v &amp; ps -e &amp;</PRE>

<P>A command executing in the background is referred to as a job, and each job is assigned a job number&#151;the bracketed number in the preceding example. C shell provides you with several commands for managing background jobs; see the section later in 
this chapter titled &quot;Job Control.&quot;

<BR></P>

<H5 ALIGN="CENTER">

<CENTER><A ID="I14" NAME="I14">

<FONT SIZE=3><B>Repetitively Executing a Command&#151;</B><B><I>repeat</I></B>

<BR></FONT></A></CENTER></H5>

<P>You can use the repeat command to execute some other command a specified number of times. While the repeat command doesn't see frequent use, it can on occasion be quite handy. For example, if you had stored some text in a model file, and wanted to make 

five copies of it, you could do so easily with the command

<BR></P>

<PRE>repeat 5 cat model.txt new.txt</PRE>

<P>Or, if you were writing a shell script to print a document, you might use the command

<BR></P>

<PRE>repeat 5 echo *******************************</PRE>

<P>to mark its first page clearly as the start of the document.

<BR></P>

<P>The syntax of the repeat command is as follows:

<BR></P>

<PRE>repeat count command</PRE>

<P>For count, specify a decimal integer number. A count of zero is valid and suppresses execution of the command.

<BR></P>

<P>For command, specify a simple command that is subject to the same restrictions as the first format of the if statement. The command is scanned for variable, command, and history substitutions, filename patterns, and quoting. It cannot be a compound 
command, a pipeline, a statement group (using {}), or a parenthesized command list.

<BR></P>

<P>Any I/O redirections are performed only once regardless of the value of count. For example, repeat 10 echo Hello &gt;hello.list would result in ten lines of Hello in a file named hello.list.

<BR></P>

<H5 ALIGN="CENTER">

<CENTER><A ID="I15" NAME="I15">

<FONT SIZE=3><B>Executing Commands in a Subshell&#151;</B><B><I>()</I></B>

<BR></FONT></A></CENTER></H5>

<P>A command (or a list of commands separated with semicolons) enclosed in parentheses groups the command or commands for execution in a subshell. A subshell is a secondary invocation of the shell, so any change to shell variables, the current directory, 
or other such process information lasts only while executing the commands in the group. This is a handy way, for example, to switch to another directory, execute a command or two, and then switch back without having to restore your current directory:

<BR></P>

<PRE>% (cd /home/bill; cp *.txt /home/john)</PRE>

<P>Without the parentheses, you would have to write:

<BR></P>

<PRE>% cd /home/bill

% cp *.txt /home/john

% cd /home/john</PRE>

<P>The syntax for grouping commands is:

<BR></P>

<PRE>( commands )</PRE>

<P>Enclosing a list of commands in parentheses is a way to override the default precedence rules for the &amp;&amp;, ||, and | operators, at the expense of invoking a subshell and losing any environmental effects of the commands' execution. For example, 
(grep || echo) | pr will pipe the output of the grep command, and possibly that of echo if grep sets a nonzero exit code, to the pr command.

<BR></P>

<P>I/O redirections can be appended to the subshell just as for a simple command; the redirections are in effect for all of the commands within the subshell. For example, (cat; echo; date) &gt; out will write the output of the cat, echo, and date commands 

to a file named out without any breaks. If you look at the file afterward, first you'll see the lines written by cat, followed by the lines written by echo, and finally the lines written by date. Similarly, input redirections apply to all commands in the 
subshell, so that each command in turn reads lines from the redirected file, starting with the line following those read by any previously executed commands in the subshell.

<BR></P>

<H5 ALIGN="CENTER">

<CENTER><A ID="I16" NAME="I16">

<FONT SIZE=3><B>Executing Commands Conditionally</B>

<BR></FONT></A></CENTER></H5>

<P>Compound commands are actually two or more commands combined together so that the shell executes all of them before prompting (or, in the case of shell scripts, reading) more input.

<BR></P>

<P>Compound commands are not often needed for work at the keyboard, and you'll rarely feel the lack if you don't understand or don't use compound commands. However, compound commands form a very useful extension to the shell's syntax, especially in shell 
scripts. Some compound command formats, such as &amp; (background job) and | (the pipe operator) are essential to effective work with UNIX.

<BR></P>

<H6 ALIGN="CENTER">

<CENTER>

<FONT SIZE=3><B>Conditional Execution on Success&#151;</B><B><I>&amp;&amp;</I></B><B> (And)</B>

<BR></FONT></CENTER></H6>

<P>The double ampersand operator (read and) is used to join two commands: <I>command1</I> &amp;&amp; <I>command2</I>. It causes the shell to execute command2 only if command1 is successful (has a zero exit code).

<BR></P>

<P>For command1 or command2, you can write a simple command or a compound command. The &amp;&amp; operator has higher precedence than || but lower precedence than |. For example,

<BR></P>

<PRE>grep '#include' *.c | pr &amp;&amp; echo OK</PRE>

<P>will echo OK only if the pipeline grep | pr sets a zero exit code. (For pipelines, the exit code is the exit code of the last command in the pipeline.)

<BR></P>

<P>The compound command cp file1.c file1.bak &amp;&amp; rm file1.c shows the possible benefit of using &amp;&amp;: The rm command will delete file1.c only if it is first successfully copied to file1.bak.

<BR></P>

<H6 ALIGN="CENTER">

<CENTER>

<FONT SIZE=3><B>Conditional Execution on Failure &#151;</B><B><I>||</I></B><B> (Or)</B>

<BR></FONT></CENTER></H6>

<P>The or operator is used to join two commands: <I>command1</I> || <I>command2</I>. It causes the shell to execute command2 only if command1 failed (set a nonzero exit code).

<BR></P>

<P>For command1 or command2, you can write a simple command or a compound command. The || operator has lower precedence than both the &amp;&amp; and | operators. For example, in the following command

<BR></P>

<PRE>grep '#include' *.c || echo No files | pr</PRE>

<P>either grep succeeds, or else the words No files are piped to the pr command. That is, the pipe is between the echo and pr commands, not between grep (or grep || echo) and pr.

<BR></P>

<P>Use the || operator to provide an alternative action. For example, in the following case, if the mkdir command fails, the exit command prevents further execution of the shell script:

<BR></P>

<PRE>mkdir $tmpfile || exit</PRE>

<H4 ALIGN="CENTER">

<CENTER><A ID="I17" NAME="I17">

<FONT SIZE=3><B>Shell Statements&#151;A Closer Look</B>

<BR></FONT></A></CENTER></H4>

<P>A command is either a basic command, or a basic command embellished with one or more I/O redirections.

<BR></P>

<P>A basic command is a series of words, each subject to replacements, which when fully resolved specifies an action to be executed and provides zero or more options and arguments to modify or control the action taken. The first word of a basic command, 
sometimes called the command name, must specify the required action.

<BR></P>

<P>In plainer terms, a statement is the smallest executable unit. When the shell is operating in interactive mode, it displays its prompt when it requires a statement. You must continue to enter shell statement components, using multiple lines if 
necessary, until you have completed a full statement. If the statement is not completed on one line, the shell will continue to prompt you, without executing the line or lines you have entered, until it has received a full statement.

<BR></P>

<P>Shell statements are formed from a number of tokens. A token is a basic syntactic element and can be any of the following:

<BR></P>

<UL>

<LI>Comments. A comment begins with any word having a pound sign (#) as its first character, and extends to the end of the line. This interpretation can be avoided by enclosing the pound sign (or the entire word) in quotes. (See &quot;Quoting and Escaping 

Special Characters&quot; later in this chapter.)

<BR>

<BR></LI>

<LI>White space. White space consists of blanks and tabs, and sometimes the newline character. White space is used to separate other tokens which, if run together, would lose their separate identity. Units of text separated by white space are generically 
called words.

<BR>

<BR></LI>

<LI>Statement delimiters. Statement delimiters include the semicolon (;) and the newline character (generated when you press return). You can use the semicolon to run commands together on the same line. The shell treats the commands as if they had been 
entered on separate lines.

<BR>

<BR> Normally every command or shell statement ends at the end of the line. The return (or Enter) key you press to end the line generates a character distinct from printable characters, blanks and tabs, which the shell sees as a newline character. Some 
statements require more than one line of input, such as the if and while commands. The syntax description for these commands shows how they should be split over lines; the line boundaries must be observed, and you must end each line at the indicated place 

or else you will get a syntax error.

<BR>

<BR></LI>

<LI>Operators. An operator is a special character, or a combination of special characters, to which the shell attaches special syntactic significance. Operators shown as a combination of special characters must be written without white space between them, 

otherwise they will be seen as two single operators instead of the two-character operator.

<BR>

<BR>Punctuation characters having special significance to the shell must be enclosed in quotes to avoid their special interpretation. For example, the command grep '#' *.c uses quotes to hide the pound sign from the shell so that the pound sign can be 
passed to grep as an argument. See the section later in this chapter titled &quot;Quoting and Escaping from Special Characters&quot; for details about using quotes.

<BR>

<BR></LI>

<LI>Words. A word is any consecutive sequence of characters occurring between white space, statement delimiters, or operators. A word can be a single group of ordinary characters, a quoted string, a variable reference, a command substitution, a history 
substitution, or a filename pattern; it can also be any combination of these elements. The final form of the word is the result of all substitutions and replacements, together with all ordinary characters, run together to form a single string. The string 
is then used as the command name or command argument during command execution.

<BR>

<BR></LI></UL>

<H4 ALIGN="CENTER">

<CENTER><A ID="I18" NAME="I18">

<FONT SIZE=3><B>Filename Substitutions (Globbing)</B>

<BR></FONT></A></CENTER></H4>

<P>Filename generation using patterns is an important facility of the Bourne shell. The C shell supports the filename patterns of the Bourne shell and adds the use of {} (braces) to allow greater flexibility.

<BR></P>

<P>Several shell commands and contexts allow the use of pattern-matching strings, such as the case statement of switch and the =~ and !~ expression operators. In these cases, pattern strings are formed using the same rules as for filename generation, 
except that the patterns are matched to another string.

<BR></P>

<P>When any of the pattern expressions described below are used as arguments of a command, the entire pattern string is replaced with the filenames or pathnames that match the pattern. By default, the shell searches the current directory for matching 
filenames, but if the pattern string contains slashes (/), it searches the specified directory or directories instead. Note that several directories can be searched for matching files in a single pattern string: a pattern of the form dir/*/*.c will search 

all the directories contained in dir for files ending with .c.

<BR></P>

<TABLE BORDER>

<TR>

<TD>

<P>*</P>

<TD>

<P>The asterisk matches any string of characters, including a null string. Used by itself, it matches all filenames. Used at the beginning of a pattern string, it means that leading prefixes of the filename pattern are ignored: *.c matches any filename 
ending with .c. Used at the end of a pattern string, it means that trailing suffixes of the filename pattern are ignored: s.* will match s.main, s.prog.c, and any filename beginning with s.. Used in the middle of a pattern, it means that matching filenames 

must begin and end as shown but can contain any character sequences in the middle: pay*.c matches filenames beginning with pay and ending with .c, such as payroll.c, paymast.c, and paycheck.c.</P>

<TR>

<TD>

<P>?</P>

<TD>

<P>The question mark matches any one character. For example, ? as a complete word will match all filenames one character long in the current directory. The pattern pay?.c will match pay1.c and pay2.c but not payroll.c. Multiple question marks can be used 
to indicate a specific number of don't-care positions in the filename: pay??.c will match filenames beginning with pay and containing any two characters before .c, such as pay01.c and paybb.c, but will not match payroll.c.</P>

<TR>

<TD>

<P>[]</P>

<TD>

<P>The square brackets enclose a list of characters. Matching filenames contain one of the indicated characters in the corresponding position of the filename. For example, [abc]* will match any filename beginning with the letter a, b, or c. Because of the 

asterisk, the first character can be followed by any sequence of characters.</P>

<TR>

<TD>

<P><BR></P>

<TD>

<P>Use a hyphen (-) to indicate a range of characters. For example, pay[1-3].c will match filenames pay1.c, pay2.c, and pay3.c, but not pay4.c or pay11.c. Multiple ranges can be used in a single bracketed list. For example, [A-Za-z0-9]* will match any 
filename beginning with a letter or a digit. To match a hyphen, list the hyphen at the beginning or end of the character list: [-abc] or [abc-] will match an a, b, c, or hyphen.</P>

<TR>

<TD>

<P><BR></P>

<TD>

<P>Use a circumflex (^) after [ to negate the range of characters. The pattern [^a-zA-Z0-9]* will match all filenames that do not begin with a letter or digit&#151;that is, filenames beginning with a punctuation character such as .c or #myfile.txt.</P>

<TR>

<TD>

<P>{}</P>

<TD>

<P>Braces enclose a list of patterns separated by commas. The brace expression matches filenames having any one of the listed patterns in the corresponding position of the name. For example, the pattern /usr/home/{kookla,fran,ollie}/.profile expands to the 

path list /usr/home/kookla/.profile /usr/home/fran/.profile /usr/home/ollie/.profile. Unlike *, ?, and [], brace-enclosed lists are not matched against existing filenames; they are simply expanded into filenames regardless of whether the corresponding 
files exist. Brace-enclosed lists can be nested, for example /usr/{bin,lib,home/{john,bill}} refers to any of the directories /usr/bin, /usr/lib, /usr/home/john, and /usr/home/bill.</P></TABLE>

<P>The tilde (~) can be used at the beginning of a word to invoke directory substitution. The tilde forms are as follows:

<BR></P>

<TABLE BORDER>

<TR>

<TD>

<P>~</P>

<TD>

<P>Substituted with the full pathname of your home directory. Also used in the form ~/<I>path</I> to refer to a file or directory under your home directory.</P>

<TR>

<TD>

<P>~<I>name</I></P>

<TD>

<P>Substituted with the full pathname of user name's home directory. For example, ~ken/bin refers to /usr/ken/bin if the home directory for user ken is /usr/ken. The password file /etc/passwd is searched for name to determine the directory pathname; if 
name is not found, the shell generates an error message and stops.</P></TABLE>

<P>If the tilde does not appear by itself as a word, and is not followed by a letter or by a slash, or appears in any position other than the first, it is not replaced. Thus, /usr/marta/~file.c is a reference to the file ~file.c in the directory 
/usr/marta.

<BR></P>

<P>It is important to realize that filename generation using pattern strings causes a replacement of one word with many. A filename pattern must be a single word. The ordinary characters and pattern-matching characters in the word describe a rule for 
choosing filenames from the current or specified directory. The word is replaced with each filename or pathname found that matches the pattern. Consider the following examples:

<BR></P>

<PRE>% echo Files: *.txt

Files: ch1.txt ch2.txt chlast.txt

% set files=(*.txt)

% echo Found $#files files

Found 3 files

% echo $files[2]

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
黄页网站大全一区二区| 99久久免费国产| 亚洲欧洲性图库| 欧美一级日韩不卡播放免费| 成人av动漫在线| 国内精品伊人久久久久影院对白| 亚洲摸摸操操av| 日本一区二区动态图| 日韩亚洲欧美成人一区| 欧美亚洲免费在线一区| proumb性欧美在线观看| 国产一区二区不卡在线| 日韩不卡一区二区| 亚洲免费高清视频在线| 国产色一区二区| 精品少妇一区二区三区视频免付费 | 日韩精品专区在线| 欧美三级一区二区| 色嗨嗨av一区二区三区| 成人在线视频一区二区| 国产一区欧美日韩| 免费高清不卡av| 午夜精品福利在线| 亚洲小少妇裸体bbw| 亚洲欧美日韩国产综合在线| 久久久国产精华| 精品国产电影一区二区| 日韩一二在线观看| 日韩一级二级三级精品视频| 欧美美女直播网站| 欧美综合亚洲图片综合区| 成人h精品动漫一区二区三区| 国产精品小仙女| 国产精品一区在线观看乱码 | 亚洲狠狠丁香婷婷综合久久久| 国产精品麻豆久久久| 国产精品欧美精品| 1024国产精品| 亚洲欧美另类综合偷拍| 自拍偷拍亚洲综合| 亚洲三级在线免费观看| 亚洲女女做受ⅹxx高潮| 亚洲精品中文在线影院| 一区二区三区中文字幕精品精品 | 午夜视频一区二区三区| 亚洲国产精品久久不卡毛片| 亚洲一区二区综合| 天堂va蜜桃一区二区三区| 日韩中文字幕av电影| 日本欧美加勒比视频| 蜜臀av性久久久久av蜜臀妖精| 蜜臀av一区二区在线观看| 久久激情五月激情| 国产成人精品一区二区三区四区 | 国产精品国产a级| 亚洲天天做日日做天天谢日日欢| 亚洲日本韩国一区| 午夜视频一区二区三区| 精品一区二区三区香蕉蜜桃| 国产精品99久久久久| 99久久精品国产网站| 在线日韩av片| 欧美一级精品在线| 国产区在线观看成人精品| 国产精品久久久久久久久动漫| 成人免费在线视频| 午夜激情一区二区三区| 美女脱光内衣内裤视频久久网站| 国产一区日韩二区欧美三区| aa级大片欧美| 欧美日韩成人综合天天影院| 久久婷婷色综合| 最新国产精品久久精品| 午夜av区久久| 国产黄色精品网站| 欧美日本一道本在线视频| 精品久久久影院| 亚洲免费观看高清完整版在线观看| 日韩精品国产精品| 成人免费视频app| 欧美日韩国产美| 国产精品久久久久影院色老大| 亚洲国产wwwccc36天堂| 国产又粗又猛又爽又黄91精品| 一本大道av伊人久久综合| 91精品欧美久久久久久动漫| 中文字幕乱码亚洲精品一区| 婷婷中文字幕综合| 成人黄色网址在线观看| 欧美一卡二卡在线| 亚洲手机成人高清视频| 精品一区二区久久| 在线亚洲+欧美+日本专区| 久久久久久免费毛片精品| 亚洲成人免费影院| 成人aa视频在线观看| 欧美一区中文字幕| 一个色妞综合视频在线观看| 国产传媒欧美日韩成人| 91精品一区二区三区久久久久久| 亚洲品质自拍视频| 国产精品亚洲成人| 日韩一区二区在线看| 曰韩精品一区二区| aaa欧美色吧激情视频| 欧美r级电影在线观看| 日韩一区精品视频| 日本高清不卡视频| 国产欧美日韩亚州综合| 狠狠色综合播放一区二区| 欧美精选一区二区| 亚洲国产精品久久不卡毛片| 91色在线porny| 国产精品网曝门| 国产精品白丝av| 日韩欧美国产一区二区在线播放| 亚洲国产中文字幕在线视频综合| 91免费国产在线| 国产精品久久久久婷婷二区次| 国产一区二区三区黄视频 | 精品综合免费视频观看| 欧美日本不卡视频| 亚洲在线视频免费观看| 在线看不卡av| 亚洲男同性恋视频| 在线免费不卡视频| 亚洲精品乱码久久久久久久久| 成人app网站| 中文字幕一区二区三区视频| 成人黄色777网| 国产精品美女久久久久久久| 国产69精品一区二区亚洲孕妇| 久久久影视传媒| 国产精华液一区二区三区| 国产色产综合色产在线视频| 国产成人免费视频网站高清观看视频| 久久精品一二三| 国产成人h网站| 成人欧美一区二区三区视频网页| 97精品国产露脸对白| 悠悠色在线精品| 欧美日韩亚洲国产综合| 舔着乳尖日韩一区| 日韩免费高清av| 国产高清在线观看免费不卡| 国产欧美一区二区精品忘忧草| aaa欧美色吧激情视频| 亚洲综合男人的天堂| 91精品蜜臀在线一区尤物| 久久aⅴ国产欧美74aaa| 久久久精品日韩欧美| av电影一区二区| 亚洲成人综合在线| 日韩精品在线看片z| 国产盗摄一区二区三区| 亚洲精品日产精品乱码不卡| 欧美日韩小视频| 精品制服美女久久| 国产精品免费免费| 欧美日韩小视频| 国内久久精品视频| 亚洲欧美日韩久久| 欧美一区二区精品久久911| 国产精品一二三区| 一区二区三区日韩精品视频| 欧美一级欧美三级在线观看| 国产精品99精品久久免费| 亚洲黄色片在线观看| 日韩免费高清av| 91首页免费视频| 美女视频一区二区| 最近日韩中文字幕| 日韩欧美精品在线视频| 91免费精品国自产拍在线不卡| 免费在线看一区| 国产精品成人一区二区艾草| 欧美人牲a欧美精品| 国产高清久久久久| 五月天激情小说综合| 国产精品无遮挡| 欧美一区二区三区播放老司机| 成人免费黄色大片| 日产国产高清一区二区三区| 国产精品不卡一区二区三区| 欧美一级黄色录像| 99精品久久久久久| 精品一区二区三区香蕉蜜桃| 一区二区三区四区不卡在线| 久久久亚洲高清| 欧美理论电影在线| 波多野结衣视频一区| 日韩成人免费电影| 亚洲欧美欧美一区二区三区| www国产成人| 7777精品伊人久久久大香线蕉超级流畅 | eeuss鲁片一区二区三区| 蜜臀a∨国产成人精品| 一区二区三区日本| 国产欧美一区二区精品性色超碰| 日韩一区二区在线播放|