t.txt 文件内容为:
<title><{$action|default:""}>-XX</title>
执行命令:
grep -n --color -E 'XX' t.txt
可以得到正确的结果
执行命令
grep -n --color -E '.*XX.*' t.txt
会在终端显示一个空行
执行命令
grep -n -E '.*XX.*' t.txt
也能得到正确的结果(对于匹配到的内容不着色)
环境: osx iterm2
以上提到的所有命令在 centos7 中完全正常
这个可能是啥原因?
