标签: regex linux bash shell escaping
问题描述如下。
# cat test hello fedora # cat test | grep h*o hello # cat test | grep 'h*o' hello fedora # cat test | grep "h*o" hello fedora
grep h*o按预期工作,但为什么执行grep 'h*o'和grep "h*o"获取fedora不包含字母h?< / p>
grep h*o
grep 'h*o'
grep "h*o"
fedora
h