- 论坛徽章:
- 0
|
本帖最后由 夜色58 于 2016-05-04 13:24 编辑
文本如下,我想匹配“MY favorator is football”这一行,为啥用grep能匹配反而用egrep匹配不到?困惑!!!!!
[root@localhost ~]# cat test.txt
my name is tom
i am form hebei
2314
i am form China
i am form China
2314
2314
MY favorator is football
2314
MY favorator is football
622BVB
执行命令如下
[root@localhost ~]# grep '^[[:upper:]].*is[[:blank:]]\{2,\}football$' test.txt
MY favorator is football
[root@localhost ~]# egrep '^[[:upper:]].*is[[:blank:]]\{2,\}football$' test.txt
[root@localhost ~]#

bBGF734
THE sky u== is blue |
|