Grouping arguments with double-quotes 用双引号来集群参数用双引号来集群参数的目
的在于使用有空白的参数。
例如:
set a "this string contains whitespace"
如够一个参数一双引号来开始,该参数会一直到下一个双引号才结束。其中可以有换行符
和分号。
子替换是在正式运行该调命令之前由分析器作的
Variable substitution with $ 用美元符进行变量替换说白了就是引用该变量。
如:
set a hello
set b $a // b = "hello" 实际上传给set命令的参数
//是b,"hello"
set c a // b = "a"
Command substitution with brackets 命令子替换(用方括号)
例如:
set a [set b "hello"]
实现执行 set b "hello" 并用其结果来替换源命令
中的方括号部分,产生一条新命令
set a "hello" //"hello" 为 set b "hello" 的返
//回值
最终的结果是b="hello" a="hello"