免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1894 | 回复: 4
打印 上一主题 下一主题

这张图fingure7-1.gif的出处在哪呀? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-27 18:54 |只看该作者 |倒序浏览


想查看相关说明!

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
2 [报告]
发表于 2006-08-27 22:03 |只看该作者
这张图具体出处,我不知道,不过他想要表达的意思我知道!
请参考:
http://www.linuxsir.org/bbs/showthread.php?t=99465

论坛徽章:
0
3 [报告]
发表于 2006-08-28 09:00 |只看该作者
原帖由 寂寞烈火 于 2006-8-27 22:03 发表
这张图具体出处,我不知道,不过他想要表达的意思我知道!
请参考:
http://www.linuxsir.org/bbs/showthread.php?t=99465



上不去呀,能否解释一下该图呀!

论坛徽章:
8
摩羯座
日期:2014-11-26 18:59:452015亚冠之浦和红钻
日期:2015-06-23 19:10:532015亚冠之西悉尼流浪者
日期:2015-08-21 08:40:5815-16赛季CBA联赛之山东
日期:2016-01-31 18:25:0515-16赛季CBA联赛之四川
日期:2016-02-16 16:08:30程序设计版块每日发帖之星
日期:2016-06-29 06:20:002017金鸡报晓
日期:2017-01-10 15:19:5615-16赛季CBA联赛之佛山
日期:2017-02-27 20:41:19
4 [报告]
发表于 2006-08-28 09:42 |只看该作者
O'eilly <learning the bash shell>

论坛徽章:
0
5 [报告]
发表于 2006-08-29 15:37 |只看该作者
每个步骤如下,解释蛮清楚的!


1.        Splits the command into tokens that are separated by the fixed set of metacharacters: SPACE, TAB, NEWLINE, ;, (, ), <, >, |, and &. Types of tokens include words, keywords, I/O redirectors, and semicolons.

2.       Checks the first token of each command to see if it is a keyword with no quotes or backslashes. If it's an opening keyword, such as if and other control-structure openers, function, {, or (, then the command is actually a compound command. The shell sets things up internally for the compound command, reads the next command, and starts the process again. If the keyword isn't a compound command opener (e.g., is a control-structure "middle" like then, else, or do, an "end" like fi or done, or a logical operator), the shell signals a syntax error.

3.       Checks the first word of each command against the list of aliases. If a match is found, it substitutes the alias's definition and goes back to Step 1; otherwise, it goes on to Step 4. This scheme allows recursive aliases (see Chapter 3). It also allows aliases for keywords to be defined, e.g., alias aslongas=while or alias procedure=function.

4.       Performs brace expansion. For example, a{b,c} becomes ab ac.

5.       Substitutes the user's home directory ($HOME) for tilde if it is at the beginning of a word. Substitutes user's home directory for ~user.  
        Two obscure variations on this: the shell substitutes the current directory ($PWD) for ~+ and the previous directory ($OLDPWD) for ~-.

6.       Performs parameter (variable) substitution for any expression that starts with a dollar sign ($).

7.       Does command substitution for any expression of the form $(string).

8.       Evaluates arithmetic expressions of the form $((string)).

9.       Takes the parts of the line that resulted from parameter, command, and arithmetic substitution and splits them into words again. This time it uses the characters in $IFS as delimiters instead of the set of metacharacters in Step 1.

10.   Performs pathname expansion, a.k.a. wildcard expansion, for any occurrences of *, ?, and [/] pairs.

11.   Uses the first word as a command by looking up its source according to the rest of the list in Chapter 4, i.e., as a function command, then as a built-in, then as a file in any of the directories in $PATH.

12.   Runs the command after setting up I/O redirection and other such things.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP