|

楼主 |
发表于 2005-9-28 11:06:31
|
显示全部楼层
第1部分问题:
After the preceding expansions, all unquoted occurrences of the characters `\', `'', and `"' that did not result from one of the above expansions are removed.
这是BASH文档上的话,大意是说既不是变量括展结果也不在引号内的一些特殊字符将被除去,而"$RMFILE"和$RMFILE的区别是有没有被分词(见第2部分问题),这是肉眼不可分别的,只有在命令行上才有意义
第2部分问题:
The shell scans the results of parameter expansion, command substitution, and arithmetic expansion that did not occur within double quotes for word splitting.
这也是BASH文档上的话,大意是说如果变量扩展(变量名替换为它的值)等等不是发生在引号内,BASH会扫描扩展出的字符串并分词,分词依据的是$IFS。也就是说引号只是作为变量扩展的环境时起作用,扩展结果中的引号不影响分词,扩展结果中匹配$IFS的才影响分词 |
|