沙盒:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Jinzd留言 | 贡献
无编辑摘要
Jinzd留言 | 贡献
无编辑摘要
第12行: 第12行:
#: 这些tokens将被解析为一些简单和复合的命令(参看[[#Shell Commands|Shell Commands]])。
#: 这些tokens将被解析为一些简单和复合的命令(参看[[#Shell Commands|Shell Commands]])。
# Performs the various shell expansions (see [[#Shell Expansions|Shell Expansions]]), breaking the expanded tokens into lists of filenames (see [[#Filename Expansion|Filename Expansion]]) and commands and arguments.  
# Performs the various shell expansions (see [[#Shell Expansions|Shell Expansions]]), breaking the expanded tokens into lists of filenames (see [[#Filename Expansion|Filename Expansion]]) and commands and arguments.  
#:  
#: 执行不同的shell扩展(参看[[#Shell Expansions|Shell Expansions]]),断句这些扩展的tokens为文件列表(参看[[#Filename Expansion|Filename Expansion]])命令及参数。
# Performs any necessary redirections (see [[#Redirections|Redirections]]) and removes the redirection operators and their operands from the argument list.  
# Performs any necessary redirections (see [[#Redirections|Redirections]]) and removes the redirection operators and their operands from the argument list.  
# Executes the command (see [[#Executing Commands|Executing Commands]]).  
# Executes the command (see [[#Executing Commands|Executing Commands]]).  
# Optionally waits for the command to complete and collects its exit status (see [[#Exit Status|Exit Status]]).
# Optionally waits for the command to complete and collects its exit status (see [[#Exit Status|Exit Status]]).

2016年7月1日 (五) 11:49的版本

3.1.1 Shell Operation

The following is a brief description of the shell’s operation when it reads and executes a command. Basically, the shell does the following:

以下是当shell读取或执行一个命令时所进行操作的的一个简要描述,shell将做以下事情:

  1. Reads its input from a file (see Shell Scripts), from a string supplied as an argument to the -c invocation option (see Invoking Bash), or from the user’s terminal.
    从文件读取它的输入(参看Shell Scripts),从字符串参数以-c调用选项方式(参看Invoking Bash),或者从用户终端。
  2. Breaks the input into words and operators, obeying the quoting rules described in Quoting. These tokens are separated by metacharacters. Alias expansion is performed by this step (see Aliases).
    断句,把相关的输入分解成words和操作符,它遵循Quoting中的引用规则。这些tokens会被元字符分开。别名扩展将按照Aliases步骤被执行。
  3. Parses the tokens into simple and compound commands (see Shell Commands).
    这些tokens将被解析为一些简单和复合的命令(参看Shell Commands)。
  4. Performs the various shell expansions (see Shell Expansions), breaking the expanded tokens into lists of filenames (see Filename Expansion) and commands and arguments.
    执行不同的shell扩展(参看Shell Expansions),断句这些扩展的tokens为文件列表(参看Filename Expansion)命令及参数。
  5. Performs any necessary redirections (see Redirections) and removes the redirection operators and their operands from the argument list.
  6. Executes the command (see Executing Commands).
  7. Optionally waits for the command to complete and collects its exit status (see Exit Status).