小编hum*_*235的帖子

参数扩展的行为

我一直认为,通过参数扩展,例如$foo,shell $foo在执行命令之前会替换参数的内容.例如,如果我设置了

foo='`'
Run Code Online (Sandbox Code Playgroud)

为什么呢

ls $foo
Run Code Online (Sandbox Code Playgroud)

有不同的行为

ls `
Run Code Online (Sandbox Code Playgroud)

bash shell quoting

3
推荐指数
1
解决办法
50
查看次数

标签 统计

bash ×1

quoting ×1

shell ×1