- 论坛徽章:
- 8
|
回复 4# seesea2517
- 3.7.1 Simple Command Expansion
- When a simple command is executed, the shell performs the following expansions, assignments, and redirections, from left to right.
- The words that the parser has marked as variable assignments (those preceding the command name) and redirections are saved for later processing.
- The words that are not variable assignments or redirections are expanded (see Shell Expansions). If any words remain after expansion, the first word is taken to be the name of the command and the remaining words are the arguments.
- Redirections are performed as described above (see Redirections).
- The text after the ‘=’ in each variable assignment undergoes tilde expansion, parameter expansion, command substitution, arithmetic expansion, and quote removal before being assigned to the variable.
复制代码 variable assignments 和 redirections的处理和其它部分是不一样的
xx=oo或 xx>oo的含义是由xx =/> oo三个部分共同确定的,这就是上下文 |
|