xyz*_*xyz 1 unix linux bash shell scripting
我正在使用bash shell
$cat test
a --b
$grep '--b' test
grep: option `--b' is ambiguous
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
$grep "--b" test
grep: option `--b' is ambiguous
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
$grep '\-\-b' test
a --b
Run Code Online (Sandbox Code Playgroud)
7.7节"引用"中的第7章"输入和输出,文件和命令评估"中的经典shell脚本
"单引号强制shell按字面意思处理引号之间的所有内容".
那么为什么单引号不起作用呢?